Setup

Three ways to see every new member

Discord itself tells you a surprising amount. Start with what is already in your server, then pipe the joins into this log so nobody is forgotten.

Add JOIN_INGEST_TOKEN in the Environment tab (any long random string). Until then POST /api/join answers 503 and nothing can write to the log.

Inside Discord, no tools needed

  1. 1

    Read the server's own invite counters

    Server Settings → Invites lists every active invite with its uses. Give each place you post a link its own invite — one for YouTube, one for your newsletter — and the counter tells you where members come from.

    Server Settings → Audit Log and the Members list (sortable by join date on desktop) show who arrived most recently.

  2. 2

    Turn on the system join messages

    Server Settings → Overview → System Messages Channel, with "Send a random welcome message when someone joins" enabled. Point it at a private #staff-log channel and you get a permanent, searchable arrival feed.

    Pair it with Membership Screening (rules a member must accept) so you can tell a real arrival from a bot sweep.

  3. 3

    Log the follow-up here

    Discord counts people. It does not remember that @quietfox never got a reply. That is what the arrivals log on the dashboard is for: Needs welcome → Welcomed → Verified, or Left.

Automatic: feed joins from your bot

Create an application at the Discord Developer Portal, add a bot, and switch on the SERVER MEMBERS INTENT under Bot → Privileged Gateway Intents — without it Discord never sends the join event. Invite the bot to your server, then run this relay:

// npm i discord.js   (run this relay anywhere: your laptop, a VPS, a worker)
const { Client, GatewayIntentBits } = require("discord.js");

const client = new Client({
  intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers],
});

client.on("guildMemberAdd", async (member) => {
  await fetch("https://YOUR-APP-URL/api/join", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "X-Join-Token": process.env.JOIN_INGEST_TOKEN,
    },
    body: JSON.stringify({
      username: member.user.username,
      discord_id: member.id,
      source: "Discord gateway",
      joined_at: new Date().toISOString(),
    }),
  });
});

client.login(process.env.DISCORD_BOT_TOKEN);

Replace YOUR-APP-URL with this app's address and use the same token you saved in the Environment tab. Any automation platform that can send a webhook works too — the endpoint only cares about the header and the JSON body.

The endpoint

POST /api/join

  • username — required, the only required field
  • discord_id — the snowflake ID
  • source — invite name or campaign
  • status — new · welcomed · verified · left
  • note — free text
  • joined_at — ISO timestamp, defaults to now (UTC)

Replies

200  { "ok": true, "id": 42 }
400  { "ok": false, "error": "username is required" }
401  { "ok": false, "error": "bad token" }
503  { "ok": false, "error": "JOIN_INGEST_TOKEN is not set" }

Test it from a terminal

curl -X POST https://YOUR-APP-URL/api/join \
  -H "Content-Type: application/json" \
  -H "X-Join-Token: YOUR_TOKEN" \
  -d '{"username":"test_user","discord_id":"418273910283746561","source":"Invite: yt-tutorial"}'

Back to the people waiting

The dashboard sorts newest first and keeps a count of everyone who still needs a hello.

Open the dashboard