A Discord administration bot for the Empire of EmptyBrains kingdom-fantasy server.
sudo ban/kick/timeout/untimeout/purge @user -m "reason"— standard moderation actionssudo warn @user -m "reason"— issue warnings (3 warnings = auto-ban)sudo warn -rm @user [all]— remove latest or all warningssudo warnings @user— view warning historysudo blacklist <word>— add/remove blacklisted words (-mfor reason,-rmto remove)sudo role4mod add/remove <role>— manage moderator rolessudo usermod -a @user— grant trusted-user bypass of role4mod checkssudo snipe— retrieve deleted messagessudo setserverinfo— configure server info
sudo judgement -m "reason" -t "minutes"— open a public judgement with anonymous testimonysudo judgement end <id>/sudo judgement verdict <id> <text>— close and verdict- Auto-concludes after the specified duration
- On ban/warn, the bot DMs the user with a Request Appeal button
- User fills a modal (3 questions) and submits
- Admin reviews in the command-log channel with Revoke Ban/Timeout/Warn and Reject buttons
- Verdict DM is sent back to the user (with rejoin invite if ban revoked)
/faction create <name> <description> <role>— create a faction/faction join/invite/leave/disband— manage membership/faction list/info/rank— browse factions/faction quest/quest-complete— faction quests
/help,/ping,/avatar,/userinfo,/serverinfo,/afk,/snipe/setchannel— configure command-log and chat-log channels/rank,/level— leveling system/about,/about-server
- Blacklisted word filtering with rate limiting (4 violations in 10s = 1min timeout)
- Warning at 3rd violation
sudo apt update/upgrade/install/remove— simulated package managersudo help— Imperial-themed help
- Activity-based XP gain
/rankand/levelto track progress
- Queue-based playback with voice state management
-
Copy
.envand configure:DISCORD_TOKEN— your bot tokenGUILD_ID— server ID for slash command syncBOT_NAME,DATABASE_PATH,LOG_DIR, etc.
-
Install dependencies:
pip install -r requirements.txt
-
Run the bot:
python main.py
Uses SQLite (database.db by default). Tables are auto-created on first run:
warnings, role4mod, mod_roles, afk, command_log_channel, chat_log_channel, blacklisted_words, server_info, factions, faction_members, faction_quests, user_levels, chat_messages, trusted_users, faction_invites, judgements, judgement_responses, appeals