major-domo-v2/utils
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
autocomplete.py CLAUDE: Refine injury roll display and cleanup imports 2025-10-16 22:20:13 -05:00
cache.py CLAUDE: Fix type annotations in CacheManager for JSON-serializable types 2025-10-14 00:22:01 -05:00
CLAUDE.md CLAUDE: Refactor dice rolling into reusable utility module and add /d20 command 2025-10-29 01:15:11 -05:00
decorators.py CLAUDE: Add draft period restriction to interactive draft commands 2025-10-25 20:29:16 -05:00
dice_utils.py CLAUDE: Refactor dice rolling into reusable utility module and add /d20 command 2025-10-29 01:15:11 -05:00
discord_helpers.py CLAUDE: Refactor scorebug display and add dynamic channel visibility 2025-10-22 16:58:21 -05:00
draft_helpers.py CLAUDE: Refactor draft system to eliminate hard-coded magic numbers 2025-10-24 22:14:17 -05:00
listeners.py Refactored listener logic and added SpoilerListener 2025-10-22 14:59:19 -05:00
logging.py CLAUDE: SUCCESSFUL STARTUP - Discord Bot v2.0 fully operational 2025-08-16 07:36:47 -05:00
random_gen.py CLAUDE: Major bot enhancements - Admin commands, player stats, standings, schedules 2025-08-28 15:32:38 -05:00
scorebug_helpers.py CLAUDE: Fix scorebug win probability display logic and enhance percentage positioning 2025-10-29 00:39:41 -05:00
team_utils.py CLAUDE: Refine injury roll display and cleanup imports 2025-10-16 22:20:13 -05:00
text_utils.py CLAUDE: Add smart text splitting for Discord embed fields 2025-10-21 14:46:24 -05:00
transaction_logging.py CLAUDE: Add automatic transaction logging to #transaction-log channel 2025-10-23 12:24:37 -05:00