Discord Ban A Bot - A comprehensive ban management bot for Discord servers.
- User ban/unban management
- Ban appeals system
- Access Control Lists (ACL)
- Server information utilities
- MySQL database integration
- Permission-based command access
- Automatic user caching
- Password hashing with Argon2
- Python 3.9+
- MySQL server
- discord.py 2.3.2+
-
Clone the repository
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Create configuration file at
~/.dbab-config/dbab.json:{ "bot": { "token": "YOUR_BOT_TOKEN" }, "mysql": { "host": "localhost", "user": "root", "password": "password", "database": "dbab_bot", "port": 3306 } }
python main.pydbab-bot/
├── main.py # Main entry point
├── config.py # Configuration loader
├── requirements.txt # Python dependencies
├── cogs/ # Command cogs
│ ├── appeals/ # Appeal commands
│ ├── moderation/ # Ban/unban commands
│ ├── owner/ # Owner-only commands
│ └── utilities/ # Utility commands
├── events/ # Event handlers
├── database/ # Database configuration
├── models/ # SQLAlchemy models
└── helpers/ # Helper utilities
/ban <user> [reason]- Ban a user/unban <user_id> [reason]- Unban a user
/appeal <reason>- Submit a ban appeal
/reload <cog_name>- Reload a cog/acl <action>- Manage access control lists
/serverinfo- Get server information
- Ban - Store ban records
- UserCache - Cache user information
ISC