major-domo-v2/commands
Cal Corum 8b77da51d8 CLAUDE: Add flexible permission system for multi-server support
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>
2025-11-06 11:29:29 -06:00
..
admin CLAUDE: Add flexible permission system for multi-server support 2025-11-06 11:29:29 -06:00
custom_commands CLAUDE: Add flexible permission system for multi-server support 2025-11-06 11:29:29 -06:00
dice CLAUDE: Refactor dice rolling into reusable utility module and add /d20 command 2025-10-29 01:15:11 -05:00
draft CLAUDE: Add flexible permission system for multi-server support 2025-11-06 11:29:29 -06:00
examples CLAUDE: Refine injury roll display and cleanup imports 2025-10-16 22:20:13 -05:00
gameplay CLAUDE: Add flexible permission system for multi-server support 2025-11-06 11:29:29 -06:00
help CLAUDE: Add flexible permission system for multi-server support 2025-11-06 11:29:29 -06:00
injuries CLAUDE: Add flexible permission system for multi-server support 2025-11-06 11:29:29 -06:00
league CLAUDE: Add flexible permission system for multi-server support 2025-11-06 11:29:29 -06:00
players Allow any user to toggle player stats 2025-10-21 13:06:03 -05:00
profile CLAUDE: Add comprehensive CLAUDE.md documentation files for AI agent guidance 2025-10-20 20:30:07 -05:00
soak Refactored listener logic and added SpoilerListener 2025-10-22 14:59:19 -05:00
spoiler Refactored listener logic and added SpoilerListener 2025-10-22 14:59:19 -05:00
teams CLAUDE: Add flexible permission system for multi-server support 2025-11-06 11:29:29 -06:00
transactions CLAUDE: Add flexible permission system for multi-server support 2025-11-06 11:29:29 -06:00
utilities CLAUDE: Add flexible permission system for multi-server support 2025-11-06 11:29:29 -06:00
voice CLAUDE: Add flexible permission system for multi-server support 2025-11-06 11:29:29 -06:00
__init__.py CLAUDE: Initial commit for discord-app-v2 rebuild 2025-08-15 00:04:50 -05:00
CLAUDE.md CLAUDE: Add comprehensive CLAUDE.md documentation files for AI agent guidance 2025-10-20 20:30:07 -05:00