"Silence the noise, guard the signal."
Bugjar safeguards your most sacred Discord channels — instantly banning anyone who speaks where they shouldn't. Clean, fast, and built for admins who don't tolerate clutter.
Bugjar is a high-performance Discord moderation bot designed for one job:
protecting certain channels from unwanted messages.
If anyone other than your allowed users or roles posts there — they're banned, their recent messages are purged, and you get notified via console or webhook logs.
| Feature | Description |
|---|---|
| 🚫 Automatic Instant Bans | Unauthorized users posting in protected channels are auto-banned — no commands, no delays. |
| 🧹 Message Cleanup | Deletes up to seven days of the offender's messages in those channels for a pristine record. |
| ⚙️ Interactive Config Builder | No manual editing required! On first run, Bugjar launches an interactive CLI wizard. |
| 🛡️ Granular Access Control | Whitelist specific User IDs or Role IDs — guild owners always immune. |
| 💬 Webhook Logging (optional) | Rich embeds for allowed messages, bans, and errors. |
| 🪄 Admin Commands | !reload & !protected with admin-only access. |
| 🎨 Colorized Console | Beautiful logs with colorama support. |
🔧 Step-by-step setup
- Python 3.10+
- Discord bot token with Message Content, Guilds, and Members intents
discord.py,aiohttp,colorama
mkdir Bugjar && cd Bugjar
# Copy bot.py herepython3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -U discord.py aiohttp coloramapython3 bot.pyBugjar launches an interactive CLI wizard to collect:
- Bot Token
- Guild ID
- Protected Channel IDs
- Allowed Roles/Users
- Appeal contact & webhook URL
Config is auto-saved as config.json!
📄 Generated `config.json` example
{
"config": {
"token": "YOUR_BOT_TOKEN_HERE",
"guild_id": 123456789012345678,
"protected_channels": ,
"allowed_roles": ,
"allowed_users": [],
"appeal_target": "AdminUser#1234",
"webhook_url": "https://discord.com/api/webhooks/..."
}
}Key Fields:
protected_channels: Channel IDs under auto-ban protectionallowed_roles/allowed_users: IDs exempt from protectionappeal_target: DM target for banned userswebhook_url: Rich logging endpoint
python3 bot.pyConsole output:
[2026-02-02 14:20:15] [INFO] Starting Bugjar — connecting to Discord...
[2026-02-02 14:20:17] [INFO] Bugjar#1234 (ID: 123456789012345678) is online
✅ Required Bot Permissions:
View ChannelManage MessagesBan Members- Higher role position than users it bans
| Command | Permission | Description |
|---|---|---|
!reload |
Administrator | Reloads config.json without restart |
!protected |
Administrator | Lists all protected channels with mentions |
🔍 Rich Discord webhook embeds
Ban Event Example:
🟥 User Banned
👤 User: @Offender (123456789)
💬 Channel: #announcements (987654321)
📝 Message: "oops wrong channel"
🏰 Guild: My Server (123456789)
✅ Result: Banned
🕐 Feb 2, 2026 2:20 PM
Event Types: Allowed Messages, Successful Bans, Permission Errors, API Failures
⚡ Quick Checklist
- Test server first — Verify config & permissions
- Precise channels only — Announcements, rules, info-only
- Use roles — Easier than user ID lists
- Bot role hierarchy — Must rank above troublemakers
- Persistent logging —
tmux,screen, orsystemd
- Stop process:
Ctrl+C - Remove bot: Kick from Discord server
- Delete files:
rm -rf Bugjar/(or your workspace)
Bugjar enforces server boundaries with surgical precision — perfect for communities where discipline meets automation.
👨💻 Created by Cheddlar
⭐ Star this repo if Bugjar keeps your channels clean!
📈 ASCII Art Preview (Console Startup)
,---,.
,' .' \
,---.' .' | ,--, .--.
| | |: | ,'_ /| ,----._,. .--,`| ,' ,'/ /|
: : : / .--. | | : / / ' / | |. ,--.--. ' | |' |
: | ; ,'_ /| : . || : | '--`_ / \ | | ,'
| : \| ' | | . .| | .\ . ,--,'| .--. .-. |' : /
| | . || | ' | | |. ; '; | | | ' \__\/: . .| | '
' : '; |: | : ; ; |' . . | : | | ," .--.; |; : |
| | | ; ' : `--' \`---`-'| | __| : ' / / ,. || , ;
| : / : , .-/.'__/\_: |.'__/\_: |; : .' \---'
| | ,' `--`----' | : :| : :| , .-/
`----' \ \ / \ \ / `--`---'
`--`-' `--`-'