A lightweight Python Discord bot with an innovative, length‑based XP system for fair progression.
- Length‑based XP: XP scales with message length, with sensible caps to prevent abuse.
- Cooldown and filters: Per‑user cooldown to deter spam; ignores bots and webhooks.
- Progression curve: Quadratic/cubic‑style thresholds for smooth level pacing.
- Slash commands: View rank/XP, leaderboards, and configure leveling.
When a message reaches the configured reaction threshold (using your chosen emoji), Kitan posts it to the starboard channel with author, content, and the link to the original message.
Python 3.10+ and a Discord application/bot with a token.
Important
Make sure to enable Message Content and Server Members intents for your bot on the Discord Developer Portal!
Tip
Consider using a virtual environment (python -m venv .venv && source .venv/bin/activate
on macOS/Linux, .venv\Scripts\activate
on Windows) before installing dependencies.
- Clone the repository and install dependencies by running:
pip install -r requirements.txt
- Start the bot using:
python main.py
Run /setup_wizard
and follow the prompts.
Note
Advanced configuration requires modifying the code (main.py
).
Available variables:
- XP_MULTIPLIER - XP per character in message
- MIN_XP_PER_MESSAGE - Minimum XP per message
- MAX_XP_PER_MESSAGE - Maximum XP per message
- XP_COOLDOWN - Cooldown in seconds between XP awards
- BOT_COLOR - Embed color (hex color code)
- MAX_LEVEL - Max level cap
Changing the level formula:
- Find the
advanced_xp_for_level
function and change the formula afterreturn
using Python's syntax.
/rank
- Check your or another user's rank./leaderboard
- Show the XP leaderboard./help_xp
- Show the help message./givexp
- (Admin only) Give XP to a user./starboard_config
- (Admin only) Configure the starboard./ignored_channels
- (Admin only) View/edit ignored channels./role_config
- (Admin only) Configure level roles.
- General: the bot needs the read and send messages permissions.
- For level roles: the bot needs Manage Roles and must be higher than the target roles in the server’s role hierarchy.
- For starboard posting: the bot needs permission to read and send messages (and embed links) on the starboard channel.
- Ensure the bot was invited with application.commands scope.
- Give it a minute after first run; commands sync on startup.
- Verify Message Content intent is enabled in the Developer Portal and in code.
- Check that the channel isn’t in ignored channels.
- Cooldown may be preventing frequent awards.
- Confirm Manage Roles permission and role order (bot’s top role above target roles).
- Check the configured channel ID and that the bot has permission there.
- Ensure the emoji and threshold are set correctly.