A versatile, modular Discord bot framework with multiple bot personalities and extensive features. This project includes a main bot with a cog-based architecture, specialized AI-powered bots (Gurt, Wheatley), and a unified API service.
- Modular Cog System: Easily add, remove, or disable functionalities through cogs
- Dynamic Command Prefixes: Customize command prefixes per server
- Comprehensive Error Handling: Robust error management for commands
- Settings Management: Per-guild settings configuration
- Help System: Interactive help command with categories
- Gurt Bot: AI assistant with memory, web search capabilities, and proactive engagement
- Wheatley Bot: Specialized AI personality with unique features
- Multi-Bot System: Run multiple AI personalities (Neru, Miku) with different configurations
- Moderation Tools: Ban, kick, mute, warn commands
- Leveling System: Track user activity and assign levels
- Role Management: Create and assign roles
- Audio Player: Play music and audio in voice channels
- Games: Fun mini-games for server engagement
- Unified API Service: Central API for data storage and retrieval
- Python 3.10+
- Discord Bot Token(s)
- Dependencies (install via
pip install -r requirements.txt
) - PostgreSQL database (optional, for advanced features)
- Redis (optional, for caching)
-
Clone the repository
git clone <repository-url> cd discordbot
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables
Create a
.env
file in the root directory with the following variables:# Required DISCORD_TOKEN=your_main_discord_bot_token OWNER_USER_ID=your_discord_user_id # For specific bots (optional) DISCORD_TOKEN_GURT=your_gurt_bot_token DISCORD_TOKEN_WHEATLEY=your_wheatley_bot_token DISCORD_TOKEN_NERU=your_neru_bot_token DISCORD_TOKEN_MIKU=your_miku_bot_token # For AI features (if using) AI_API_KEY=your_openrouter_api_key GCP_PROJECT_ID=your_gcp_project_id GCP_LOCATION=us-central1 # For web search (optional) TAVILY_API_KEY=your_tavily_api_key # For database (if using) POSTGRES_USER=your_postgres_user POSTGRES_PASSWORD=your_postgres_password POSTGRES_HOST=localhost POSTGRES_SETTINGS_DB=discord_bot_settings # For Redis (if using) REDIS_HOST=localhost REDIS_PORT=6379 REDIS_PASSWORD=your_redis_password
-
Create necessary directories
mkdir -p data/chroma_db
python main.py
Gurt Bot
python run_gurt_bot.py
Wheatley Bot
python run_wheatley_bot.py
Multiple Bots
python run_additional_bots.py
python api_service/api_server.py
- Default prefix:
!
(customizable per server) - Use
!help
to see available commands
- Default prefix:
%
- Use
%ai <prompt>
to interact with the AI - Use
%aihelp
for AI command help - Use
%gurtmood
to check or set Gurt's mood
- Default prefix:
%
- Use
%ai <prompt>
to interact with Wheatley - Use
/wheatleymemory
to interact with Wheatley's memory
- Use
/multibot start <bot_id>
to start a specific bot - Use
/multibot stop <bot_id>
to stop a specific bot - Use
/multibot startall
to start all configured bots
main.py
: Main bot entry pointgurt_bot.py
/wheatley_bot.py
: Specialized bot entry pointsmulti_bot.py
: Multi-bot system for running multiple AI personalitiescogs/
: Directory containing different modules (cogs)gurt/
: Gurt bot-specific moduleswheatley/
: Wheatley bot-specific modulesapi_service/
: API service for data persistencesettings_manager.py
: Handles guild-specific settingserror_handler.py
: Centralized error handling
- Edit
config.json
to adjust bot settings - Use environment variables for sensitive information
- Edit
data/multi_bot_config.json
to configure multiple bot personalities
Contributions are welcome! Please follow standard coding practices and ensure your changes are well-documented.
There is no license. UNLICENSE