A feature-rich, modular Discord bot built with Python for server management, automation, and user engagement.
Recon is a comprehensive Discord bot framework designed for modern server management and automation. Built with Python 3.12 and discord.py, it features a modular command structure, event handling system, and extensive server management capabilities. The bot is optimized for performance, scalability, and ease of customization.
- 🎮 Modular Command System: Organized command structure with easy extensibility
- 📊 Server Management: Bot management, user tracking, and server information tools
- 🔔 Event Handling: Custom event system for real-time server monitoring
- ⚙️ Configuration Management: Centralized settings and environment configuration
- 🎯 User Interaction: Ping, echo, and user info utilities
- 📝 Template System: Pre-built command and event templates for rapid development
- 🎨 Rich Embeds: Professional message formatting with Discord embeds
- 📈 Kickban System: Advanced moderation and user management
- 🗂️ Database Integration: Persistent data storage with SQLite/PostgreSQL support
- 🔒 Security: Environment variable management and secure configuration
- Language: Python 3.12+
- Framework: discord.py 2.0+ (Async/Await)
- Database: SQLite (upgradeable to PostgreSQL)
- Configuration: python-dotenv for environment management
- Virtual Environment: venv for dependency isolation
discord.py- Discord API wrapperpython-dotenv- Environment variable managementasyncio- Asynchronous I/O operationsaiohttp- Async HTTP client/server- Additional dependencies in
requirements.txt
- Pattern: Command-Event driven architecture
- Structure: Modular cog-based design
- Scalability: Horizontal scaling ready
- Performance: Async operations for non-blocking execution
- Python 3.12+
- pip (Python package manager)
- Discord Bot Token
- 512MB+ RAM recommended
- Linux/Windows/macOS compatible
Recon/
├── commands/ # Command modules (Cogs)
│ ├── botmanagement.py # Bot control and management
│ ├── echo.py # Message echo functionality
│ ├── kickban.py # Moderation commands
│ ├── ping.py # Latency checking
│ ├── rapsheet.py # User history tracking
│ ├── serverinfo.py # Server information display
│ ├── settings.py # Bot configuration commands
│ ├── userinfo.py # User profile information
│ ├── warn.py # Warning system
│ └── template_command.py # Command template for new features
│
├── events/ # Event handlers
│ ├── modlog.py # Moderation logging
│ ├── welcome.py # Member welcome messages
│ └── _template_events.py # Event template
│
├── app.py # Main bot application
├── db.py # Database operations and models
├── pyenv.cfg # Python environment configuration
├── requirements.txt # Python dependencies
├── .env.example # Environment variables template
└── README.md # Project documentation
git clone https://github.com/SaliqBashir/Recon.git
cd Recon# Create virtual environment
python -m venv .venv
# Activate virtual environment
# On Windows:
.venv\Scripts\activate
# On Linux/Mac:
source .venv/bin/activatepip install -r requirements.txt# Copy example environment file
cp .env.example .env
# Edit .env with your credentials
# Required: DISCORD_TOKEN, DATABASE_URL (optional)python db.pypython app.py- Bot status control
- Restart and shutdown commands
- System information
/kick- Remove members from server/ban- Ban users with reason logging/warn- Issue warnings to users/rapsheet- View user moderation history
/ping- Check bot latency/serverinfo- Display server statistics/userinfo- Show user profile details
/echo- Repeat messages/settings- Configure bot behavior
- Welcome System: Automated member greeting
- Moderation Logging: Track all moderation actions
- Custom Events: Extensible event system
- Environment Variables: Secure token and API key storage
- Permission Checks: Role-based command access
- Input Validation: Sanitized user inputs
- Rate Limiting: Prevent command spam
- Audit Logging: Complete action history
- Users: Member profiles and statistics
- Moderation: Warnings, kicks, and bans
- Settings: Server-specific configurations
- Logs: Action and event history
- Use
template_command.pyas a starting point - Create new file in
commands/directory - Implement command logic with decorators
- Load cog in
app.py
- Use
_template_events.pyas reference - Create new file in
events/directory - Implement event listeners
- Register events in main application
- Asynchronous Programming: Expert use of Python async/await patterns
- API Integration: Discord API implementation with discord.py
- Database Management: ORM patterns and efficient query design
- Modular Architecture: Scalable, maintainable cog-based structure
- Event-Driven Design: Real-time event handling and processing
- Error Handling: Comprehensive exception management
- Code Organization: Clean separation of concerns
- Version Control: Git workflow and best practices
- Documentation: Well-commented code and clear structure
- DevOps Ready: Environment-based configuration
- Slash Commands: Modern Discord interaction support
- Embed Messages: Rich, formatted responses
- Button Interactions: Interactive UI components
- Modal Forms: Advanced user input collection
- Auto-complete: Smart command suggestions
- Cooldowns: Rate limiting and spam prevention
- Async Operations: Non-blocking I/O for maximum efficiency
- Connection Pooling: Optimized database connections
- Caching: Reduced API calls with intelligent caching
- Lazy Loading: Commands loaded on-demand
- Memory Management: Efficient resource utilization
- Dashboard web interface
- Advanced analytics and statistics
- Multi-language support
- Custom command creation (no-code)
- Integration with external APIs
- Music playback functionality
- Ticket system for support
- Economy and leveling system
- Automated moderation with AI
- Docker containerization
- Linting: PEP 8 compliant code
- Type Hints: Enhanced code clarity
- Virtual Environment: Isolated dependencies
- Git: Version control and collaboration
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
For any questions or suggestions, please reach out through GitHub issues or connect with me on LinkedIn.