Major Domo v2 - Discord bot for Strat-o-Matic Baseball Association
Implements decorator-based permission system to support bot scaling across multiple Discord servers with different command access requirements. Key Features: - @global_command() - Available in all servers - @league_only() - Restricted to league server only - @requires_team() - Requires user to have a league team - @admin_only() - Requires server admin permissions - @league_admin_only() - Requires admin in league server Implementation: - utils/permissions.py - Core permission decorators and validation - utils/permissions_examples.py - Comprehensive usage examples - Automatic caching via TeamService.get_team_by_owner() (30-min TTL) - User-friendly error messages for permission failures Applied decorators to: - League commands (league, standings, schedule, team, roster) - Admin commands (management, league management, users) - Draft system commands - Transaction commands (dropadd, ilmove, management) - Injury management - Help system - Custom commands - Voice channels - Gameplay (scorebug) - Utilities (weather) Benefits: - Maximum flexibility - easy to change command scopes - Built-in caching - ~80% reduction in API calls - Combinable decorators for complex permissions - Clean migration path for existing commands 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .gitlab | ||
| .vscode | ||
| api | ||
| commands | ||
| models | ||
| scripts | ||
| services | ||
| tasks | ||
| tests | ||
| utils | ||
| views | ||
| .dockerignore | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| .mcp.json | ||
| bot.py | ||
| BUILD_AND_PUSH.md | ||
| build-and-push.sh | ||
| CLAUDE.md | ||
| COMMAND_LIST.md | ||
| config.py | ||
| docker-compose.dev.yml | ||
| docker-compose.yml | ||
| DOCKER.md | ||
| Dockerfile | ||
| Dockerfile.versioned | ||
| exceptions.py | ||
| pyrightconfig.json | ||
| requirements.txt | ||
| test_real_data.py | ||