major-domo-v2/tests
Cal Corum 9991b5f4a0 CLAUDE: Refactor dice rolling into reusable utility module and add /d20 command
- Created utils/dice_utils.py with reusable dice rolling functions
  - DiceRoll dataclass for roll results
  - parse_and_roll_multiple_dice() for multiple dice notation
  - parse_and_roll_single_dice() for single dice notation
  - Graceful error handling with empty list returns

- Refactored commands/dice/rolls.py to use new utility module
  - Removed duplicate DiceRoll class and parsing methods
  - Updated all method calls to use standalone functions
  - Added new /d20 command for quick d20 rolls
  - Fixed fielding prefix command to include d100 roll

- Updated tests/test_commands_dice.py
  - Updated imports to use utils.dice_utils
  - Fixed all test calls to use standalone functions
  - Added comprehensive test for /d20 command
  - All 35 tests passing

- Updated utils/CLAUDE.md documentation
  - Added Dice Utilities section with full API reference
  - Documented functions, usage patterns, and design benefits
  - Listed all commands using dice utilities

Benefits:
- Reusability: Dice functions can be imported by any command file
- Maintainability: Centralized dice logic in one place
- Testability: Functions testable independent of command cogs
- Consistency: All dice commands use same underlying logic

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-29 01:15:11 -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
factories.py CLAUDE: Add weather and charts commands with utility infrastructure 2025-10-10 09:59:49 -05:00
test_api_client.py CLAUDE: SUCCESSFUL STARTUP - Discord Bot v2.0 fully operational 2025-08-16 07:36:47 -05:00
test_commands_charts.py CLAUDE: Reorganize data storage and enhance team/roster displays 2025-10-15 19:05:51 -05:00
test_commands_dice.py CLAUDE: Refactor dice rolling into reusable utility module and add /d20 command 2025-10-29 01:15:11 -05:00
test_commands_dropadd.py CLAUDE: Fix trade system issues and enhance documentation 2025-10-06 16:10:13 -05:00
test_commands_profile_images.py CLAUDE: Implement player image management system 2025-10-10 13:54:12 -05:00
test_commands_soak.py CLAUDE: Implement soak easter egg with disappointment GIFs and tracking 2025-10-13 23:25:22 -05:00
test_commands_transactions.py CLAUDE: Add pagination and move ID display to /mymoves command 2025-10-14 16:51:24 -05:00
test_commands_voice.py CLAUDE: Refactor voice cleanup service to use @tasks.loop pattern 2025-10-24 00:05:35 -05:00
test_commands_weather.py CLAUDE: Add weather and charts commands with utility infrastructure 2025-10-10 09:59:49 -05:00
test_config.py CLAUDE: Major bot enhancements - Admin commands, player stats, standings, schedules 2025-08-28 15:32:38 -05:00
test_constants.py CLAUDE: Remove constants.py and migrate to config-based constants 2025-10-16 10:52:05 -05:00
test_dropadd_integration.py CLAUDE: Comprehensive bot improvements and test infrastructure 2025-10-02 11:35:26 -05:00
test_exceptions.py CLAUDE: Initial commit for discord-app-v2 rebuild 2025-08-15 00:04:50 -05:00
test_models_custom_command.py CLAUDE: Major bot enhancements - Admin commands, player stats, standings, schedules 2025-08-28 15:32:38 -05:00
test_models_help_command.py CLAUDE: Add graceful error handling for missing creators in custom commands 2025-10-13 17:53:58 -05:00
test_models_trade.py CLAUDE: Fix trade system issues and enhance documentation 2025-10-06 16:10:13 -05:00
test_models_transaction.py CLAUDE: Complete dice command system with fielding mechanics 2025-09-24 22:30:31 -05:00
test_models.py CLAUDE: Fix draft channel configuration not persisting 2025-10-24 22:52:57 -05:00
test_services_base_service.py CLAUDE: Major bot enhancements - Admin commands, player stats, standings, schedules 2025-08-28 15:32:38 -05:00
test_services_custom_commands.py CLAUDE: Major bot enhancements - Admin commands, player stats, standings, schedules 2025-08-28 15:32:38 -05:00
test_services_help_commands.py CLAUDE: Add graceful error handling for missing creators in custom commands 2025-10-13 17:53:58 -05:00
test_services_injury.py Clear Injury bug fix 2025-10-22 19:20:43 -05:00
test_services_integration.py CLAUDE: Initial commit for discord-app-v2 rebuild 2025-08-15 00:04:50 -05:00
test_services_league_service.py CLAUDE: Add logged_command decorator and migrate Discord commands to reduce boilerplate 2025-08-15 14:56:42 -05:00
test_services_player_service.py Fixing get_config replacement issue 2025-10-17 08:00:24 -05:00
test_services_team_service.py Fixing get_config replacement issue 2025-10-17 08:00:24 -05:00
test_services_trade_builder.py Fixing get_config replacement issue 2025-10-17 08:00:24 -05:00
test_services_transaction_builder.py CLAUDE: Comprehensive bot improvements and test infrastructure 2025-10-02 11:35:26 -05:00
test_services_transaction.py CLAUDE: Complete dice command system with fielding mechanics 2025-09-24 22:30:31 -05:00
test_tasks_custom_command_cleanup.py CLAUDE: Major bot enhancements - Admin commands, player stats, standings, schedules 2025-08-28 15:32:38 -05:00
test_tasks_transaction_freeze.py CLAUDE: Automate player roster updates in transaction freeze/thaw system 2025-10-27 14:25:00 -05:00
test_transactions_integration.py CLAUDE: Comprehensive bot improvements and test infrastructure 2025-10-02 11:35:26 -05:00
test_utils_autocomplete.py CLAUDE: Fix trade system issues and enhance documentation 2025-10-06 16:10:13 -05:00
test_utils_decorators.py CLAUDE: Add logged_command decorator and migrate Discord commands to reduce boilerplate 2025-08-15 14:56:42 -05:00
test_utils_logging.py CLAUDE: SUCCESSFUL STARTUP - Discord Bot v2.0 fully operational 2025-08-16 07:36:47 -05:00
test_utils_scorebug_helpers.py CLAUDE: Fix scorebug win probability display logic and enhance percentage positioning 2025-10-29 00:39:41 -05:00
test_views_custom_commands.py CLAUDE: Major bot enhancements - Admin commands, player stats, standings, schedules 2025-08-28 15:32:38 -05:00
test_views_injury_modals.py CLAUDE: Add comprehensive tests for injury modal playoff week validation 2025-10-29 01:00:57 -05:00
test_views_transaction_embed.py Follow-up updates for bug fix 2025-10-27 14:28:33 -05:00
TRANSACTION_TEST_COVERAGE.md CLAUDE: Complete dice command system with fielding mechanics 2025-09-24 22:30:31 -05:00