major-domo-v2/commands
Cal Corum 5d922ead76 CLAUDE: Add core draft command with global pick lock
Implement /draft slash command with comprehensive pick validation:

Core Features:
- Global pick lock (asyncio.Lock) prevents concurrent picks
- 30-second stale lock auto-override for crash recovery
- FA player autocomplete with position and sWAR display
- Complete pick validation (GM status, turn order, cap space)
- Player team updates and draft pick recording
- Success/error embeds following EmbedTemplate patterns

Architecture:
- Uses @logged_command decorator (no manual error handling)
- Service layer integration (no direct API access)
- TeamService caching for GM validation (80% API reduction)
- Global lock in cog instance (not database - local only)
- Draft monitor task can acquire same lock for auto-draft

Validation Flow:
1. Check global lock (reject if active pick <30s)
2. Validate user is GM (cached lookup)
3. Get draft state and current pick
4. Validate user's turn or has skipped pick
5. Validate player is FA and cap space available
6. Execute pick with atomic updates
7. Post success and advance to next pick

Ready for /draft-status and /draft-admin commands next.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-24 14:58:09 -05:00
..
admin CLAUDE: Add /admin-clear-scorecards command for manual channel management 2025-10-22 17:03:43 -05:00
custom_commands CLAUDE: Remove duplicate emojis from EmbedTemplate method calls 2025-10-14 00:43:05 -05:00
dice Add pitcher injury numbers to AB rolls 2025-10-23 23:47:45 -05:00
draft CLAUDE: Add core draft command with global pick lock 2025-10-24 14:58:09 -05:00
examples CLAUDE: Refine injury roll display and cleanup imports 2025-10-16 22:20:13 -05:00
gameplay Make /scorebug ephemeral 2025-10-23 19:51:51 -05:00
help CLAUDE: Add comprehensive CLAUDE.md documentation files for AI agent guidance 2025-10-20 20:30:07 -05:00
injuries Clear Injury bug fix 2025-10-22 19:20:43 -05:00
league Add sba_logo_url to the config and update /standings formatting 2025-10-21 14:40:03 -05: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 comprehensive CLAUDE.md documentation files for AI agent guidance 2025-10-20 20:30:07 -05:00
transactions CLAUDE: Change transaction diagnostic logging from INFO to DEBUG 2025-10-23 16:09:12 -05:00
utilities CLAUDE: Add multi-image support for charts 2025-10-20 22:00:19 -05:00
voice CLAUDE: Refactor voice cleanup service to use @tasks.loop pattern 2025-10-24 00:05:35 -05: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