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

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