A Discord bot template for managing World of Warcraft guilds. Handles player management, weekly taxation, vacation tracking, raid signups, and trial member management.
This project is designed as a template - fork it and customize it for your own guild!
- Player Management: Add/remove players, track Discord IDs
- Tax System: Configurable weekly tax (flasks, gold, materials - whatever your guild needs)
- Vacation Tracking: Record vacation periods, query who's currently away
- Trial System: Manage trial members, promote or kick with reasons
- Raid Signups: Send embed messages with role reactions (Tank/Heal/DD)
- Fun Commands: Guild-specific entertainment commands
- Music: Play YouTube audio in voice channels
- Python 3.9+
- MySQL 5.7+ or MariaDB 10.3+
- Discord Bot Token
git clone <repository-url>
cd SlightlyUnstableBot
pip install -r requirement.txtCopy the example environment file and fill in your values:
cp .env.example .envEdit .env with your credentials:
DISCORD_TOKEN=your_discord_bot_token
DB_HOST=localhost
DB_PORT=3306
DB_NAME=subot
DB_USER=root
DB_PASSWORD=your_password
# Tax configuration
TAX_PER_WEEK=18
TAX_NAME=flasksImport the database schema:
mysql -u root -p subot < res/mysql_db.sqlpython main.pyThe tax system is fully configurable:
TAX_PER_WEEK: Amount owed per week (e.g., 18 flasks, 500 gold)TAX_NAME: What to call the tax in messages (e.g., "flasks", "gold", "materials")
Examples:
# For flask tax
TAX_PER_WEEK=18
TAX_NAME=flasks
# For gold tax
TAX_PER_WEEK=500
TAX_NAME=gold
# For material tax
TAX_PER_WEEK=50
TAX_NAME=enchanting materialsEdit res/bot_config.ini to customize:
- Error messages
- Fun command responses
- URLs (WoW Audit, guild spreadsheet, progress tracking)
SlightlyUnstableBot/
├── main.py # Entry point
├── BotModel.py # Bot initialization (Singleton)
├── cogs/
│ ├── CommandRegisterService.py
│ ├── commands/ # Slash command handlers
│ │ ├── PlayerCommands.py # Player management
│ │ ├── TrialCommands.py # Trial member management
│ │ ├── ReminderCommands.py # Automated reminders
│ │ ├── MessageCommands.py # Info & messaging
│ │ ├── FunCommands.py # Entertainment
│ │ ├── ReactionCommands.py # Raid signups
│ │ └── MusicCommands.py # Voice channel audio
│ └── events/ # Event handlers
├── logic/
│ ├── classes/ # Core utilities
│ │ ├── DatabaseConnector.py
│ │ ├── ConfigHandler.py
│ │ └── OutputHandler.py
│ ├── services/ # Business logic
│ │ └── TaxService.py # Tax calculation
│ ├── models/ # Data models
│ └── helper/ # Utility functions
├── res/ # Configuration files
│ ├── bot_config.ini # Bot settings
│ └── mysql_db.sql # Database schema
└── tests/ # Unit tests
| Command | Description |
|---|---|
/add_gamer |
Add a player to the database |
/delete_gamer |
Remove a player |
/add_vacation |
Set vacation dates for a player |
/end_vacation |
End a player's vacation |
/add_tax |
Record tax payment |
/fetch_all |
List all players with tax status |
| Command | Description |
|---|---|
/show_trials |
List all trial members |
/make_trial |
Mark a member as trial |
/kick_trial |
Kick a trial member |
| Command | Description |
|---|---|
/tax |
Check tax status for a player |
/gildentab |
Get guild spreadsheet link |
/wowaudit |
Get WoW Audit link |
/progress |
Get progress tracking link |
/help |
Show all commands |
| Command | Description |
|---|---|
/start_tax_reminder |
Start daily tax payment reminder |
/stop_tax_reminder |
Stop tax payment reminder |
| Command | Description |
|---|---|
/join |
Join your voice channel |
/leave |
Leave voice channel |
/play |
Play audio from URL |
/skip |
Skip current track |
/queue |
Show music queue |
The bot tracks payments using a date-based system that handles year boundaries correctly:
- Tax Rate: Configurable via
TAX_PER_WEEKenvironment variable - Tracking: Stores "paid until" date instead of raw counts
- Credit: Players can pay ahead and accumulate unlimited credit
- Reminders: Automatic daily reminders for overdue players
- New players start with
paid_until = today(no debt) - When payment is added:
paid_until += (amount / tax_rate) weeks - Status check:
weeks_ahead = (paid_until - today) / 7 - If
weeks_ahead < 0: player is behind and owes tax
pytest tests/ -vThis repo has Claude Code integrated via GitHub Actions. To request a fix or feature:
- Open a GitHub Issue
- Tag
@claudein the issue description or a comment - Claude will analyze the codebase and create a PR with the fix
Example:
@claude please add a /clear_tax command that resets a player's tax status
MIT License - Feel free to use this as a template for your own guild bot!