Skip to main content

Discord Multi Bot

A modern, self-hosted Discord multi bot built on Discord.py, full feature set out of the box for the MSK Scripts Discord server.
All bots run in a single process, each bot stays in its own module for clarity and maintainability.


✨ Features

Commands Bot

CommandDescriptionRoles
/pingShow bot latencyEveryone
/userinfoUser info including minigame pointsEveryone
/flachwitzRandom German flat jokeEveryone
/rgGuess the secret numberEveryone
/script_guidesSupport guides for MSK scriptsEveryone
/clearDelete messages (max. 100)Team
/randomSet secret number for the guessing gameTeam
/add_flachwitzAdd a new flat jokeTeam
/send_messageSend a message via modalFounder, Manager
/send_embedSend an embed via modalFounder, Manager
/informationPost the information embedFounder, Manager
/rulesPost the rules embedFounder, Manager
/backup_databaseCreate a MySQL database backupFounder

Events Bot

Logged events (all as colored embeds with timestamp):

CategoryEvents
👤 MemberJoin, Leave (incl. kick detection), Ban, Unban, Username/Nickname change, Roles added/removed
💬 MessagesDeleted (incl. attachments & who deleted), Bulk delete, Edited (before/after + jump link)
📁 ChannelsCreated, Deleted, Renamed, Topic/Slowmode/NSFW changed
🔑 RolesCreated, Deleted, Renamed, Color/Permissions/Mentionable changed
🔊 VoiceJoined, Left, Switched channel
🔗 InvitesCreated (with code, channel, expiry), Deleted

Context menu commands (right-click on a message):

CommandDescriptionRoles
Comment FeedbackAdd a comment to a feedback embed. The original author receives a DM.Founder, Manager
Answer a MessageReply to a messageFounder, Manager
Edit MessageEdit a bot messageFounder, Manager
Edit EmbedEdit a bot embedFounder, Manager

Feedback channel behavior:

  • Messages posted in the feedback channel are automatically converted into embeds.
  • When a team member comments on feedback via "Comment Feedback", the original author receives a DM containing the comment text and who wrote it.
  • If the user has DMs disabled, the comment is still saved in the embed — only the DM is skipped.

Minigames Bot

All games (except /8ball) are integrated into the points system. Use /points to check your current score and progress toward rewards.

Commands

CommandDescription
/tictactoeTicTacToe vs bot (Easy / Medium / Hard)
/8ballMagic 8-Ball – yes/no questions
/diceRoll dice (d4, d6, d8, d10, d12, d20, d100)
/flipcoinFlip a coin (Heads / Tails)
/rpsRock Paper Scissors
/slotsSlot machine with animation
/triviaMultiple choice quiz (OpenTrivia DB + local fallback)
/hangmanHangman with ASCII art
/connect4Connect Four vs bot
/wordleGuess the 5-letter word in 6 tries
/blackjackBlackjack with Hit / Stand / Double Down
/pointsShow your points and reward progress

Points System

GamePoints
TicTacToeEasy: Win +5 / Lose -2 / Draw +1 · Medium: +10/-4/+2 · Hard: +20/-5/+5
FlipcoinWin +3 / Lose -1
RPSWin +5 / Lose -2 / Draw +0
SlotsJackpot +50 / Mega +20 / Big +10 / Win +8 / Small +3 / No match -2
TriviaEasy: +5/-1 · Medium: +10/-2 · Hard: +20/-3
HangmanWin +15 / Lose -3
Connect4Win +10 / Lose -3 / Draw +2
Wordle1 try +50 → 6 tries +5 / Lose -5
BlackjackWin +15 / Blackjack +25 / Lose -5 / Draw +0

/8ball is excluded from the points system.

Reward Tiers

TierPointsReward
🥉 Bronze Player500Role
🥈 Silver Player1,500Role + 1 free encrypted script from the shop
🥇 Gold Player4,000Role
💎 Diamond Player10,000Role + 1 free source script from the shop

Point values and rewards can be adjusted in bots/minigames/points_config.json. Add Discord role IDs there to enable automatic role assignment — restart the bot after changes.


📁 Project Structure

discord_multibot/
├── main.py # Entry point – starts all bots in parallel
├── .env # Tokens & IDs (never commit this!)
├── .env.example # Template for .env
├── .gitignore
├── requirements.txt
├── multibot.service # systemd unit file
├── multibot.log # Log file (created automatically)

├── data/ # Persistent data (created automatically)
│ ├── flachwitze.json # Joke database
│ └── points.json # Minigame points for all users

├── core/ # Shared components used by all bots
│ ├── config.py # All settings loaded from .env
│ ├── utils.py # Embed builder, JSON helpers, BaseModal
│ └── points_manager.py # Read/write points, handle reward unlocks

└── bots/
├── commands/ # Main slash command bot
│ ├── bot.py
│ └── cogs/
│ ├── admin.py # /backup_database, /send_message, /send_embed
│ ├── community.py # /rules, /information + persistent views
│ ├── minigames.py # /random, /rg, /flachwitz, /add_flachwitz
│ ├── support.py # /script_guides
│ └── utility.py # /ping, /userinfo (incl. points), /clear

├── events/ # Event logging bot
│ ├── bot.py
│ └── cogs/
│ ├── logging_cog.py # All guild events as colored embeds
│ ├── message_handler.py # on_message, feedback channel handling
│ └── context_menus.py # Comment Feedback (+ DM), Answer/Edit Message, Edit Embed

└── minigames/ # Minigames bot
├── bot.py
├── points_config.json # Point values & rewards (user-editable)
└── cogs/
├── tictactoe.py # /tictactoe – Easy / Medium / Hard AI
├── eightball.py # /8ball – Magic 8-Ball
├── dice.py # /dice – Roll dice (d4–d100)
├── flipcoin.py # /flipcoin – Flip a coin
├── rps.py # /rps – Rock Paper Scissors
├── slots.py # /slots – Slot machine with animation
├── trivia.py # /trivia – Multiple choice quiz
├── hangman.py # /hangman – Hangman with ASCII art
├── connect4.py # /connect4 – Connect Four vs bot
├── wordle.py # /wordle – Guess the 5-letter word
├── blackjack.py # /blackjack – Blackjack with Double Down
└── points.py # /points – Show points & reward progress

📝 License

AGPL-3.0 — Source code must remain open and be published under the same license when distributed or hosted.