An open source Discord moderation bot with slash commands, supporting ban, timeout, warn, rank system, voice management, reaction roles, polls, and more. Configured entirely through Discord without touching any config files.
- Ban, kick & unban: members with automatic hierarchy checks
- Timeout: members for a specified duration
- Warn system: with automatic DM notifications and persistent warn records
- Bulk message deletion: with auto-deleting confirmation
- Lock & unlock: channels instantly
- Slowmode: per channel
- Server mute & unmute:members in voice channels
- Move:members between voice channels
- Voice channel user limit: set or remove the user cap on any voice channel
- Add or remove roles:from members with hierarchy validation
- HEX role colour:change a role's colour using any HEX code
- Create:text or voice channels via slash command
- Member info: joined date, roles, account age and more
- Avatar: display any member's profile picture
- Server info: member count, boost level, creation date and more
- Role list: all roles in the server at a glance
- Members earn 15–25 XP per message (60-second cooldown to prevent spam)
- Level-up announcements in channel
- Role rewards: sign roles automatically when members reach specific levels
/rankand/leaderboardcommands
- Set up automatic replies triggered by specific messages
- Multiple responses per trigger (bot picks one at random)
- Add multiple responses at once by separating them with commas
- Subscribe to multiple YouTube channels per server
- Notifications sent to a designated channel with an embed and optional role ping
- Identified by custom tags for easy management
- Checks for new videos every 5 minutes via RSS (no API key required)
- Create reaction-based polls with up to 9 options
- Separate options with
;
- Assign roles automatically when members react to a message
- Roles are removed when the reaction is taken back
- Manage via
/reactionrole add,/reactionrole remove,/reactionrole list
- Dice roller with customisable number of sides
- Welcome messages: with customisable text and member mention
- Auto role: assignment on member join
- All settings configured entirely through Discord
Follow the steps according to your OS.
After completing step one of the installation section, follow these steps:
The bot needs a Discord Bot Token to run. If you don't know how to get one, go to the Discord Developer Portal, create an application, and copy your token from the Bot tab.
-
Show Hidden Files:
- Windows: In the folder, click the "View" tab and check "Hidden Items".
- Linux / macOS: Press
Ctrl + Hinside the folder to reveal the.envfile.
-
Paste Your Token:
- Open the
.envfile with Notepad or any text editor. - Replace
DISCORD_TOKEN=with your token:DISCORD_TOKEN=your_token_here - Save and close the file.
- Open the
All other settings (welcome channel, auto role) are configured directly in Discord via the
/set-welcome-channel,/set-welcome-message, and/set-auto-rolecommands. No need to edit any files.
Go to the Discord Developer Portal, select your application, click the Bot tab, and enable the following:
- ✅ Server Members Intent
- ✅ Message Content Intent
Python is usually pre-installed on Linux. Open your terminal and follow these steps:
-
Clone the repository:
git clone https://github.com/kDaejungg/wgbot.git
⚠️ FOLLOW THE CONFIGURATION STEPS MENTIONED ABOVE BEFORE CONTINUINGcd wgbot -
Create a virtual environment:
python3 -m venv venv
-
Activate the virtual environment:
source venv/bin/activate -
Install requirements:
pip install -r requirements.txt
-
Run the bot:
python3 bot.py
You can use PowerShell or Command Prompt (CMD). Make sure Python is added to your system PATH.
-
Clone the repository:
git clone https://github.com/kDaejungg/wgbot.git
⚠️ FOLLOW THE CONFIGURATION STEPS MENTIONED ABOVE BEFORE CONTINUINGcd wgbot
-
Create a virtual environment:
python -m venv venv -
Activate the virtual environment:
.\venv\Scripts\activate
-
Install requirements:
pip install -r requirements.txt -
Run the bot:
python bot.py
Mac users can follow these steps using the Terminal app:
-
Clone the repository:
git clone https://github.com/kDaejungg/wgbot.git
⚠️ FOLLOW THE CONFIGURATION STEPS MENTIONED ABOVE BEFORE CONTINUINGcd wgbot -
Create a virtual environment:
python3 -m venv venv
-
Activate the virtual environment:
source venv/bin/activate -
Install requirements:
pip install -r requirements.txt
-
Run the bot:
python3 bot.py
After running the bot, follow these steps to invite it to your server:
- Go to the Discord Developer Portal and select your application.
- In the left menu, click OAuth2 → URL Generator.
- Under Scopes, check the following:
-
bot -
applications.commands(required for slash commands)
-
Under Bot Permissions, check exactly the following:
✅ Administrator
- Copy the Generated URL at the bottom of the page.
- Paste it into your browser and invite the bot to your server.
⚠️ Note: If slash commands don't appear after adding the bot, restart your Discord client or make sure the bot has the "Use Application Commands" permission.
WGBot/
├── bot.py # Main bot engine, loads all cogs automatically
├── config.py # Token loader and settings manager
├── settings.json # Saved bot configuration
├── about.json # Bot identity info (version, developer)
├── requirements.txt # Required Python libraries
├── .env # Your bot token (never share this)
├── .gitignore # Prevents token and unnecessary files from being pushed to GitHub
├── data/
│ ├── warns.json # Warning records (auto-generated)
│ ├── ranks.json # XP and rank data (auto-generated)
│ ├── levelroles.json # Level role rewards (auto-generated)
│ ├── autoreplies.json # Auto reply triggers and responses (auto-generated)
│ ├── youtube.json # YouTube notification subscriptions (auto-generated)
│ ├── tickets.json # Ticket system configuration (auto-generated)
│ └── reactionroles.json # Reaction role configuration (auto-generated)
└── cogs/
├── moderation.py # ban, kick, unban, timeout, delete, lock, unlock, slowmode
├── warns.py # warn, warnings, clearwarnings
├── voice.py # mute-voice, unmute-voice, move
├── voice_limit.py # voice-limit
├── roles.py # role add/remove
├── role_colour.py # role-colour
├── channels.py # create-channel
├── info.py # userinfo, avatar, serverinfo, roles
├── rank.py # rank, leaderboard, XP system, levelrole
├── autoreply.py # autoreply add/remove/list
├── youtube.py # youtube add/remove/list
├── poll.py # poll
├── reaction_roles.py # reactionrole add/remove/list
├── fun.py # roll
├── welcome.py # welcome messages and auto role on member join
├── tickets.py # ticket-setup, ticket, bugticket, feedbackticket, supportticket
├── setup.py # set-welcome-channel, set-welcome-message, set-auto-role, settings
├── about.py # about
└── help.py # help
Never share your .env file or commit it to a public repository. The .gitignore file already excludes it, but always double-check before pushing.
Developed by Enes Ramazan Whitelineage