Current State (Hacky)
Hardcoded Admin Roles
Admin check is duplicated in 3 places with hardcoded role names:
admin_roles = {"admin", "typer-admin"}
Locations:
user_commands.py:282
admin_commands.py:28
bot.py:297
Problem: Server admins must create roles named exactly "Admin" or "typer-admin" (case-insensitive). No flexibility for existing server structures.
Implicit Channel Setup
Bot posts wherever commands are run:
- Fixture announcements go to the channel where
/admin fixture create was executed
- Results post to wherever
/admin results calculate runs
- No dedicated prediction/results channels
Problem: Admins must remember to run commands in the "correct" channel. Easy to accidentally spam the wrong channel.
No Server-Specific Configuration
All servers using the bot share the same hardcoded settings. No per-server customization.
Desired State (Configurable)
Server Admin Configuration
Server admins should be able to configure via commands:
Roles:
/config admin-role set @RoleName - Which role can use admin commands
/config admin-role add @AnotherRole - Multiple admin roles allowed
/config admin-role list - See current admin roles
Channels:
/config channel predictions #predictions - Where fixtures are announced
/config channel results #results - Where results are posted
/config channel general #football-chat - Default channel for other messages
Other Settings:
/config timezone Europe/London - Override server timezone
/config language pl - Future: i18n support
Migration Path
For existing deployments:
- Check if config table exists
- If not: create with defaults matching current hardcoded values
- Existing servers continue working unchanged
Permission Requirements
Bot needs:
- Manage Roles (to verify admin roles)
- Manage Channels (to read/write in configured channels)
- Existing: Send Messages, Read Message History, Add Reactions
Open Questions
- Storage: New
server_config table keyed by guild_id? Or use Discord's native command permissions?
- UI: Discord slash command permissions vs our own role check - which wins?
- Setup flow: Should bot DM server owner on first join with setup instructions?
- Multi-guild: Bot currently designed for single server - should we embrace multi-guild support?
Priority
Medium - Current hardcoded setup works but is brittle. Configurable setup enables broader adoption.
Related
Current State (Hacky)
Hardcoded Admin Roles
Admin check is duplicated in 3 places with hardcoded role names:
Locations:
user_commands.py:282admin_commands.py:28bot.py:297Problem: Server admins must create roles named exactly "Admin" or "typer-admin" (case-insensitive). No flexibility for existing server structures.
Implicit Channel Setup
Bot posts wherever commands are run:
/admin fixture createwas executed/admin results calculaterunsProblem: Admins must remember to run commands in the "correct" channel. Easy to accidentally spam the wrong channel.
No Server-Specific Configuration
All servers using the bot share the same hardcoded settings. No per-server customization.
Desired State (Configurable)
Server Admin Configuration
Server admins should be able to configure via commands:
Roles:
/config admin-role set @RoleName- Which role can use admin commands/config admin-role add @AnotherRole- Multiple admin roles allowed/config admin-role list- See current admin rolesChannels:
/config channel predictions #predictions- Where fixtures are announced/config channel results #results- Where results are posted/config channel general #football-chat- Default channel for other messagesOther Settings:
/config timezone Europe/London- Override server timezone/config language pl- Future: i18n supportMigration Path
For existing deployments:
Permission Requirements
Bot needs:
Open Questions
server_configtable keyed by guild_id? Or use Discord's native command permissions?Priority
Medium - Current hardcoded setup works but is brittle. Configurable setup enables broader adoption.
Related