Levels
LiveXP per message, server leaderboard and reward roles.
How XP is earned
Each message earns a random amount within an adjustable range, once per quiet period. Without that delay, the leaderboard would reward flooding rather than presence.
| Setting | Default |
|---|---|
xpPerMessage | Between 15 and 25 XP |
cooldownSeconds | 60 seconds |
multiplier | 1, to speed progress up or slow it down |
noXpChannelIds | No channel excluded |
noXpRoleIds | No role excluded |
The curve
The cost of a level grows with its square: the first ones come fast, the next ones are earned. The formula is fixed rather than configurable, because changing it afterwards would re-rank everyone. The pace is set with the multiplier.
| Level | Total XP |
|---|---|
5 | ≈ 1,200 XP |
10 | ≈ 5,000 XP |
25 | ≈ 45,000 XP |
50 | ≈ 300,000 XP |
Reward roles
A reward ties a level to a role. It can remove those of the lower levels, for anyone who wants a single visible role at a time rather than a collection.
Everything is computed before writing: a single Discord call rather than an add followed by a removal, so there is no instant where the member has neither the old role nor the new one. Roles out of the bot’s reach are skipped.
The commands
| Command | Effect |
|---|---|
/rank | Level, rank, messages and progress bar |
/leaderboard | Server leaderboard, ten per page |
/xp give | Adds XP to a member |
/xp set | Sets their total XP |
/xp reset | Resets it to zero |
Leaving and coming back
A member who leaves drops out of the leaderboard without losing their XP: the line stays, only their leave date changes. If they come back, they find exactly where they were. A leaderboard full of people who left interests nobody.