Invite Tracking
Resolves which invite brought each new member in, counts those invites per person, and hands out roles or currency when someone hits a milestone.
How It Works
Aegis keeps a cached snapshot of every invite's use count. When a member joins, it diffs the current counts against that snapshot to figure out which invite code was used. That includes a single-use invite that gets consumed and deleted in the same moment, and the server's vanity URL (tracked separately, since Discord doesn't include vanity invites in the normal invite list).
How Invites Are Counted
A join is only worth something if the person stayed and was real, so the number on the leaderboard is
total = regular + bonus, where regular is joins minus the ones who left and the ones that were fake.
Every invited member falls into exactly one bucket rather than being counted and then subtracted twice
- Fake. The account was younger than your threshold when it joined. Default 3 days; set it to 0 to count every account. An account's age comes from its Discord ID, so changing the threshold re-checks every join you already have rather than only new ones.
- Left. They joined and have since gone. Counts again if they come back. You can switch this off if you'd rather leaves didn't matter.
- Regular. Everything else.
Each member counts once, for whoever invited them first, so someone leaving and rejoining through a different invite doesn't hand out a second credit. Joins nobody can be credited for (through the vanity URL, or an invite that couldn't be resolved) are real joins but not a person, so they appear on Analytics as "Vanity URL" and "Not tracked" rather than on the leaderboard.
A plain join count was deliberately rejected: it puts whoever farms alts or invites people who immediately leave at the top, which is the one thing this kind of leaderboard must not reward.
Leave tracking starts from when this shipped. Members who left before that still count until they leave again. That's an honest late start rather than a number guessed from an incomplete member list.
Rewards
Set a milestone at any number of invites and choose what it gives: a role, an amount of currency from the economy, or both. Up to 25 milestones per server, checked the moment a join credits someone rather than whenever the leaderboard is next opened.
Each milestone is handed out once per member. Dropping back below one, because an invited member left, doesn't take it away again: removing something already given is the kind of surprise a server should choose deliberately, not inherit. A role Aegis can't assign, because it sits above the bot or has been deleted, stays unclaimed and lands once that's fixed.
Bonus Invites
Invites added by hand, on top of what someone earned, for a giveaway, a partnership, or fixing a miscount. Negative numbers take invites away. Setting someone to 0 removes their adjustment. Bonuses save on their own rather than with the rest of the page, and every change is recorded in the Settings Audit Log.
Where It Shows Up
- Invite Tracking on the dashboard: the settings, the milestones, bonus invites, and the standings with each person's breakdown.
- /leaderboards โ Invites ranks members by the same number, with the breakdown on each row.
- The Member Joined log entry (see Logging) adds "Invited by" and "Invite code" fields whenever attribution succeeds.
- The dashboard's Invite Log page lists the last 100 joins with Member, Invited By, Code, and When. It's a plain read-only history.