Skip to content

πŸ›‘οΈ AI-powered Discord moderation bot with advanced filtering, auto-muting, event logging, and customizable role-based controls β€” built using discord.py.

License

Notifications You must be signed in to change notification settings

YoussefOsama12345/ModGuardian

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ ModGuardian

ModGuardian is an AI-powered Discord moderation bot designed to help server admins maintain a clean, spam-free, and well-managed community. Built with Python, discord.py, and real-time filters, it includes automatic bad word filtering, logging, mute/ban commands, and more.

ModGuardian Banner


✨ Features

  • 🚫 Bad Word Filter – Auto-deletes messages containing offensive words (customizable)
  • πŸ—£οΈ Anti-Spam – Detects repeated messages to prevent spam
  • πŸ”‡ Mute/Unmute – Temporarily mute members with timed unmute
  • πŸ‘’ Kick & Ban – Commands for kicking and banning members
  • πŸ“ Event Logger – Logs message deletes and edits to a dedicated channel
  • πŸ‘‹ Welcome/Leave Messages – Greets users when they join or leave
  • πŸ” Role-Based Permissions – Only trusted roles can use mod tools
  • πŸ’¬ Command Prefix Customization via .env or settings.py

πŸš€ Getting Started

1. Clone the repository

git clone https://github.com/your-username/modguardian.git
cd modguardian

2. Create and configure .env or settings.py

BOT_TOKEN=your-discord-bot-token
COMMAND_PREFIX=!
LOG_CHANNEL_ID=123456789012345678
MUTE_ROLE_NAME=Muted
GUILD_ID=123456789012345678

Or alternatively, use settings.py:

BOT_TOKEN = "your-discord-bot-token"
COMMAND_PREFIX = "!"
LOG_CHANNEL_ID = 123456789012345678
MUTE_ROLE_NAME = "Muted"
GUILD_ID = 123456789012345678

3. Install dependencies

pip install -r requirements.txt

4. Run the bot

python bot.py

πŸ“ Project Structure

modguardian/
β”œβ”€β”€ bot.py                 # Main bot launcher
β”œβ”€β”€ settings.py            # Config file (or use .env)
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ data/
β”‚   └── bad_words.json     # List of filtered words
β”œβ”€β”€ cogs/
β”‚   β”œβ”€β”€ moderation.py      # Kick, ban, mute, unmute
β”‚   β”œβ”€β”€ filters.py         # Profanity + anti-spam
β”‚   β”œβ”€β”€ events.py          # Joins, leaves, errors
β”‚   └── logger.py          # Message delete/edit logging
β”œβ”€β”€ utils/
β”‚   β”œβ”€β”€ bad_word_loader.py
β”‚   └── time_utils.py
└── assets/
    └── banner.png         # Bot banner/logo

βœ… Permissions Checklist

Before inviting the bot, ensure these permissions are granted:

  • Send Messages
  • Manage Messages
  • Manage Roles
  • Kick Members
  • Ban Members
  • Read Message History
  • Embed Links

βœ… Enable These in Discord Developer Portal:

  • βœ… SERVER MEMBERS INTENT
  • βœ… MESSAGE CONTENT INTENT
  • βœ… Presence Intent

🧠 Customization

  • Add/remove words in data/bad_words.json
  • Modify filter behavior in filters.py
  • Customize duration logic in time_utils.py

πŸ›  Tech Stack

  • Python 3.10+
  • discord.py
  • dotenv or settings-based config
  • Async/Await architecture

πŸ“œ License

This project is licensed under the APACHE License.

Feel free to fork, extend, and deploy your own version!


🀝 Contributing

Pull requests and issues are welcome!

If you'd like to contribute features, translations, or ideas, just open an issue or fork the repo.


πŸ‘‘ Created By

Made with ❀️ by Youssef Osama

About

πŸ›‘οΈ AI-powered Discord moderation bot with advanced filtering, auto-muting, event logging, and customizable role-based controls β€” built using discord.py.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages