# Discord Bot v2.0 - Pre-Launch Roadmap **Last Updated:** January 2025 **Target Launch:** TBD **Current Status:** Core functionality complete including trading system, remaining utility commands needed ## ๐ŸŽฏ Overview This document outlines the remaining functionality required before the Discord Bot v2.0 can be launched to replace the current bot. All core league management features are complete - this roadmap focuses on utility commands, integrations, and user experience enhancements. ## โœ… Completed Core Features - **Player Information** (`/player`) - Comprehensive player cards with stats - **Team Management** (`/team`, `/teams`, `/roster`) - Team information and roster breakdown - **League Operations** (`/league`, `/standings`, `/schedule`) - League-wide information - **Transaction Management** (`/mymoves`, `/legal`) - Player transaction tracking - **Trading System** (`/trade`) - Full interactive trading with validation and dedicated channels - **Voice Channels** (`/voice-channel`) - Automatic gameplay channel creation with cleanup - **Custom Commands** (`/custom-command`) - User-created custom text commands - **Admin Commands** - League administration and management tools - **Background Services** - Automated cleanup, monitoring, and maintenance ## ๐Ÿšง Remaining Pre-Launch Requirements ### ๐Ÿ”ง Critical Fixes Required #### 1. Custom Command Backend Support **โœ… COMPLETED** - **Status**: Complete and functional - **Implementation**: Custom commands system fully operational - **Features**: Users can create/manage custom text commands - **Files**: `commands/custom_commands/`, `services/custom_command_service.py` - **Completed**: January 2025 ### ๐ŸŽฎ Utility Commands #### 2. Weather Command **โœ… COMPLETED** - **Command**: `/weather [team_abbrev]` - **Status**: Complete and fully functional - **Implementation**: Ballpark weather rolling system for gameplay - **Features Implemented**: - Smart team resolution (explicit param โ†’ channel name โ†’ user owned team) - Season display (Spring/Summer/Fall based on week) - Time of day logic (division weeks, games played tracking) - D20 weather roll with formatted display - Stadium image and team color styling - **Completed**: January 2025 #### 3. Charts Display System **โœ… COMPLETED** - **Command**: `/charts ` - **Status**: Complete and fully functional - **Implementation**: Chart display and management system - **Features Implemented**: - Autocomplete chart selection with category display - Multi-image chart support - JSON-based chart library (12 charts migrated from legacy bot) - Admin commands for chart management (add, remove, list, update) - Category organization (gameplay, defense, reference, stats) - Proper embed formatting with descriptions - **Data Storage**: `storage/charts.json` with JSON persistence - **Completed**: January 2025 #### 4. Custom Help System **โœ… COMPLETED** - **Commands**: `/help [topic]`, `/help-create`, `/help-edit`, `/help-delete`, `/help-list` - **Status**: Complete and ready for deployment (requires database migration) - **Description**: Comprehensive help system for league documentation, resources, FAQs, and guides - **Features Implemented**: - Create/edit/delete help topics (admin + "Help Editor" role) - Categorized help library (rules, guides, resources, info, faq) - Autocomplete for topic discovery - Markdown-formatted content - View tracking and analytics - Soft delete with restore capability - Full audit trail (who created, who modified) - Interactive modals for creation/editing - Paginated list views - Permission-based access control - **Data Storage**: PostgreSQL table `help_commands` via API - **Replaces**: Planned `/links` command (more flexible solution) - **Documentation**: See `commands/help/README.md` and `.claude/DATABASE_MIGRATION_HELP_COMMANDS.md` - **Completed**: January 2025 ### ๐Ÿ–ผ๏ธ User Profile Management #### 5. Image Management Commands **โœ… COMPLETED** - **Command**: `/set-image ` - **Status**: Complete and fully functional - **Description**: Allow users to update player fancy card and headshot images - **Features Implemented**: - Single command with fancy-card/headshot choice parameter - Player name autocomplete (prioritizes user's team) - Comprehensive URL validation (format + accessibility testing) - Preview embed with confirmation dialog - Permission system (users can edit org players, admins can edit anyone) - Integration with existing player card system - HTTP HEAD request to test URL accessibility - Content-type verification (must be image/*) - **Permissions**: - Regular users: Can update players in their organization (ML/MiL/IL) - Administrators: Can update any player's images - **Database**: Updates `vanity_card` or `headshot` fields in player model - **Documentation**: See `commands/profile/README.md` - **Tests**: Comprehensive test coverage (22 tests) in `tests/test_commands_profile_images.py` - **Completed**: January 2025 ### ๐ŸŽฏ Gaming & Entertainment #### 6. Meme Commands - **Primary Command**: `/lastsoak` - **Description**: Classic SBA meme commands for community engagement - **Features**: - `/lastsoak` - Display last player to be "soaked" (statistical reference) - Embed formatting with player info and stats - Historical tracking of events - **Data Source**: Database queries for recent player performance - **Estimated Effort**: 1-2 hours #### 7. Scouting System - **Command**: `/scout [options]` - **Description**: Weighted dice rolling system for scouting mechanics - **Features**: - Multiple dice configurations - Weighted probability systems - Result interpretation and display - Historical scouting logs - **Complexity**: Custom probability algorithms - **Estimated Effort**: 3-4 hours #### 8. Trading System **โœ… COMPLETED** - **Command**: `/trade [parameters]` - **Status**: Complete and fully functional - **Implementation**: Full interactive trading system with comprehensive features - **Features Implemented**: - Trade proposal system with interactive UI - Multi-party trade support (up to 2 teams) - Trade validation (roster limits, salary caps, sWAR tracking) - Trade history and tracking - Integration with transaction system - Dedicated trade discussion channels with smart permissions - Pre-existing transaction awareness for accurate projections - **Completed**: January 2025 ## ๐Ÿ“‹ Implementation Priority ### Phase 1: Critical Fixes โœ… COMPLETED 1. โœ… **Custom Command Backend** - Fixed and fully operational (January 2025) ### Phase 2: Core Utilities 2. โœ… **Weather Command** - Complete with smart team resolution (January 2025) 3. โœ… **Charts System** - Complete with admin management and 12 charts (January 2025) 4. โœ… **Help System** - Complete with comprehensive help topics and CRUD capabilities (January 2025) ### Phase 3: User Features 5. โœ… **Image Management** - Complete with URL validation and permissions (January 2025) 6. **Meme Commands** - Community engagement ### Phase 4: Advanced Features 7. **Scout Command** - Complex gaming mechanics 8. โœ… **Trade Command** - Complete with comprehensive features (January 2025) ## ๐Ÿ—๏ธ Architecture Considerations ### Command Organization ``` commands/ โ”œโ”€โ”€ utilities/ โ”‚ โ”œโ”€โ”€ weather.py # Weather command โ”‚ โ”œโ”€โ”€ charts.py # Charts display system โ”‚ โ””โ”€โ”€ links.py # Resource links system โ”œโ”€โ”€ profile/ โ”‚ โ””โ”€โ”€ images.py # Image management commands โ”œโ”€โ”€ gaming/ โ”‚ โ”œโ”€โ”€ memes.py # Meme commands (lastsoak) โ”‚ โ”œโ”€โ”€ scout.py # Scouting dice system โ”‚ โ””โ”€โ”€ trading.py # Trade management system ``` ### Service Layer Requirements - **WeatherService**: API integration for weather data - **ResourceService**: Chart and link management - **ProfileService**: User image management - **ScoutingService**: Dice mechanics and probability - โœ… **TradingService**: Complete - complex trade logic and validation implemented (January 2025) ### Database Schema Updates - โœ… **Custom commands**: Complete and operational (January 2025) - **Resources**: Chart/link storage tables - **Player images**: Image URL fields - โœ… **Trades**: Complete - trade proposal and history tables implemented (January 2025) ## ๐Ÿงช Testing Requirements ### Test Coverage Goals - **Unit Tests**: All new services and commands - **Integration Tests**: Database interactions, API calls - **End-to-End Tests**: Complete command workflows - **Performance Tests**: Database query optimization ### Test Categories by Feature - **Weather**: API mocking, error handling, rate limiting - **Charts/Links**: URL validation, admin permissions - **Images**: URL validation, permission checks - โœ… **Trading**: Complete - complex multi-user scenarios, validation logic all tested (January 2025) ## ๐Ÿ“š Documentation Updates ### User-Facing Documentation - Command reference updates - Feature guides for complex commands (trading, scouting) - Admin guides for resource management ### Developer Documentation - Service architecture documentation - Database schema updates - API integration guides ## โšก Performance Considerations ### Database Optimization - Index requirements for new tables - Query optimization for complex operations (trading) - Cache invalidation strategies ### API Rate Limiting - Weather API rate limits and caching - Image URL validation and caching - Error handling for external services ## ๐Ÿš€ Launch Checklist ### Pre-Launch Validation - [ ] All commands functional and tested - [ ] Database migrations completed - [ ] API keys and external services configured - [ ] Error handling and logging verified - [ ] Performance benchmarks met ### Deployment Requirements - [ ] Environment variables configured - [ ] External API credentials secured - [ ] Database backup procedures tested - [ ] Rollback plan documented - [ ] User migration strategy defined ## ๐Ÿ“Š Success Metrics ### Functionality Metrics - **Command Success Rate**: >95% successful command executions - **Response Time**: <2 seconds average response time - **Error Rate**: <5% error rate across all commands ### User Engagement - **Command Usage**: Track usage patterns for new commands - **User Adoption**: Monitor migration from old bot to new bot - **Community Feedback**: Collect feedback on new features ## ๐Ÿ”ฎ Post-Launch Enhancements ### Future Considerations (Not Pre-Launch Blockers) - Advanced trading features (trade deadline management) - Enhanced scouting analytics and reporting - Weather integration with game scheduling - Mobile-optimized command interfaces - Advanced user profile customization --- ## ๐Ÿ“ž Development Notes ### Current Bot Architecture Strengths - **Robust Service Layer**: Clean separation of concerns - **Comprehensive Testing**: 44+ tests with good coverage - **Modern Discord.py**: Latest slash command implementation - **Error Handling**: Comprehensive error handling and logging - **Documentation**: Thorough README files and architectural docs ### Technical Debt Considerations - โœ… **Custom Commands**: Resolved - backend fully operational (January 2025) - โœ… **Trading System**: Complete with comprehensive validation (January 2025) - **Database Performance**: Monitor query performance with new features - **External Dependencies**: Manage API dependencies and rate limits - **Cache Management**: Implement caching for expensive operations ### Resource Requirements - **Development Time**: ~4-6 hours remaining (reduced from 20-25 hours) - โœ… Custom Commands: Complete (saved 2-3 hours) - โœ… Trading System: Complete (saved 6-8 hours) - โœ… Weather Command: Complete (saved 3-4 hours) - โœ… Charts System: Complete (saved 2-3 hours) - โœ… Help System: Complete (saved 2-3 hours) - โœ… Image Management: Complete (saved 2-3 hours) - Remaining: Memes (1-2h), Scout (3-4h) - **API Costs**: None required (weather is gameplay dice rolling, not real weather) - **Database Storage**: Minimal increase for new features - **Hosting Resources**: Current infrastructure sufficient --- **Target Timeline: 1 week for complete pre-launch readiness** **Next Steps: Implement remaining features (meme commands and scouting system)**