Documentation / Levels and XP / XP & Leveling
On this page
Overview Earning XP XP per message The rate limit (anti-spam) What counts as a message The level curve Leveling up Why level-ups can lag a minute Losing XP Per-member stats The Settings page Rate limit fields Command Reference

XP & Levels — XP & Leveling Premium

How members earn XP from messages, the rate limit that prevents spam, the fixed level curve, the /profile command, and the Settings page.

Overview

Every qualifying message a member sends in your server earns a random amount of XP. XP accumulates into a level on a fixed curve shared by every server. This page covers how XP is earned, the anti-spam rate limit, the level curve, the /profile command, and the Settings page where you configure the rate limit.

For the level-up announcement template and channel, see Level-Up Announcements. For level-to-role rewards, see Level Rewards. For the five mini-games that award extra XP, see Mini-Games.

Earning XP

XP is awarded automatically for ordinary chat. There is nothing a member does beyond talking — no command to run, no opt-in. The rules are simple and fixed:

XP per message

Each qualifying message awards a random integer between 10 and 30 XP (inclusive). The range is the same for every server and cannot be changed. The randomness keeps the system fair and prevents scripting.

The rate limit (anti-spam)

To prevent a member from farming XP by spamming, each server has a per-member rate limit. The limit is expressed as a rolling window: at most N messages earn XP within any M-second window.

Only real messages count. Editing a message, deleting a message, and reactions do not award XP. Messages in threads are subject to the same rate limit as the parent channel.

What counts as a message

A "qualifying message" is a real message from a human member in a server where Mokito is present. The following do not earn XP:

The level curve

XP maps to levels on a fixed curve. The curve is the same for every server and cannot be changed. Level 0 is reached at 100 total XP; below that, a member is level 0. Each level requires progressively more XP than the one before it.

The XP required to advance from level N to level N+1 follows the formula:

5 * (N + 1)^2 + 50 * (N + 1) + 100

The total XP required to reach level N follows the formula:

(10 * N^3 + 165 * N^2 + 755 * N + 600) / 6
You do not need the formula. Levels 0 through 5000 are precomputed, and the bot uses the formula only for levels past 5000 — a practical ceiling that is extremely hard to reach. The /profile command and the leaderboard always show the correct level for any amount of XP.

Leveling up

When a member's accumulated XP crosses a level threshold, they level up. What happens next depends on your configuration:

Why level-ups can lag a minute

Level-ups are not processed at the exact moment a message is sent. A background task runs every minute and scans for members whose level has advanced past the last-processed level. This means a level-up announcement or role grant can lag up to about a minute behind the actual level crossing. If a member crosses multiple levels in one jump (for example, from a large /daily claim), the task processes every crossed level in one pass — the member gets every announcement and every reward role they passed.

Losing XP

XP can go down as well as up. The /coin-flip mini-game lets a member wager XP on a coin flip — a wrong guess removes the wagered XP. This can drop a member's level. A loss is clamped at zero — a member can never go below 0 XP, even if the wager exceeds their current balance (only the available XP is actually lost). See Mini-Games → Coin Flip for details.

Per-member stats

For every member who has earned XP, Mokito tracks the following:

StatWhat it means
Total XPThe member's accumulated XP. Goes up with messages and mini-game wins, down with coin-flip losses (floored at 0).
LevelThe member's current level, derived from total XP via the fixed curve.
Messages SentThe count of qualifying messages the member has sent. Wagers and daily claims do not increment this.
Average XP / MessageTotal XP from messages divided by Messages Sent. Wagers and daily claims do not inflate this because they do not bump the message count.
Last XP earnedThe timestamp of the last time the member earned XP (from any source).

The Settings page

The XP & Levels → Settings page is where you configure the XP rate limit and the level-up announcement. Only the server owner and managers can open it. The page has three sections:

Rate limit fields

The rate limit is set with two number inputs:

FieldWhat it meansDefaultBounds
MessagesThe maximum number of messages that can earn XP within the window.11 – 65,535
SecondsThe length of the rolling window in seconds.51 – 65,535

A helper line below the inputs reads: "A member earns XP for at most N message(s) sent within any M-second window." Save is at the bottom of the form; a green toast confirms the new rate limit.

Command Reference

The XP & Leveling surface exposes one slash command:

CommandArgumentsWho can use itResponse
/profile None Any member (Premium server) Ephemeral embed with the caller's level, total XP, server rank, messages sent, average XP per message, XP to next level, and a progress bar. Only the caller sees it.

See the Overview → /profile page for the full list of fields and an example.