Commit Graph

34 Commits

Author SHA1 Message Date
Cal Corum
c043948238 CLAUDE: Fix gauntlet game creation and Event 9 issues
Multiple fixes to resolve PlayNotFoundException and lineup initialization errors:

1. gauntlets.py:
   - Fixed Team object subscriptable errors (use .id instead of ['id'])
   - Added fallback cardsets (24, 25, 26) for Event 9 RP shortage
   - Fixed draft_team type handling (can be Team object or dict)

2. cogs/gameplay.py:
   - Fixed gauntlet game creation flow to read field player lineup from sheets
   - Catches LineupsMissingException when SP not yet selected
   - Instructs user to run /gamestate after SP selection

3. utilities/dropdown.py:
   - Fixed SelectStartingPitcher to create own session instead of using closed session
   - Store game/team IDs instead of objects to avoid detached session issues
   - Added exception handling for failed legality check API calls

These changes fix the issue where gauntlet games would fail to initialize
because the SP lineup entry wasn't being committed to the database.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 18:56:38 -06:00
Cal Corum
0e3b98eb65 S10 Updates + PR Bugfix 2025-11-09 06:12:46 -06:00
Cal Corum
660c6ad904 Added search functionality to /player command 2025-10-08 14:45:41 -05:00
Cal Corum
3debfd6e82 Catchup commit
Includes discord_ui refactor, testing overhaul, addition of
2025-07-22 09:22:19 -05:00
Cal Corum
65abc8ed55 Remove outdate image links
Add S3 image links
Pull all fielding ratings at game start
2025-06-04 09:54:13 -05:00
Cal Corum
17680a2348 Added /substitution defense 2025-05-30 01:19:45 -05:00
Cal Corum
a416e90db9 New postion sub logic 2025-03-09 00:59:10 -06:00
Cal Corum
f8aad38739 Update cache refresh logic to replace vs delete 2025-02-23 22:50:58 -06:00
Cal Corum
557404301a Fix fatigue bugs 2025-02-11 00:58:45 -06:00
Cal Corum
479a335373 Gauntlet evolution fix 2025-02-09 21:38:19 -06:00
Cal Corum
d5f2978b01 Update new-game flow 2025-02-06 15:12:12 -06:00
Cal Corum
cd9d5e49d0 Add confirmation_message param to ask_with_buttons 2025-02-01 21:33:12 -06:00
Cal Corum
3273af6465 Helpers checks 2025-01-24 10:08:35 -06:00
Cal Corum
965ceebd35 Add responders check to dropdowns
Add colors and insults to helpers
Finish /set commands with helpers post /new-game
Add POW check for pitchers
2024-12-27 22:33:25 -06:00
Cal Corum
724b8922f2 Update gauntlet get SP for new objects
Handle gamestates without full lineups
Added /set command for lineup and SP
Fixed uncapped hit bugs
Added league_name property to Games
Fix get_team for gauntlets
Fixed SelectSP dropdown bug
2024-12-27 16:12:25 -06:00
Cal Corum
f40347e0bb Fixed chaos button bug
Added batting statline to batter & OT to catchers
2024-12-25 16:10:24 -06:00
Cal Corum
9dbd7896c4 Add PB to catcher string
Fix chaos interaction bug
2024-12-25 15:00:22 -06:00
Cal Corum
fddb06b2fe Mege cleanup 2024-12-24 16:10:44 -06:00
Cal Corum
19cdf969d1 Merge branch 'master' into sqlmodel-alembic-pytests-rebuild 2024-12-24 14:51:59 -06:00
Cal Corum
5f8a422c2c Added Brilliant Stars gauntlet 2024-12-24 00:22:30 -06:00
Cal Corum
7f6472bbc6 Batter subs plus cleanup 2024-12-23 10:09:11 -06:00
Cal Corum
8118b4a691 Added PO/FO to fielding roll
Complete /log xcheck and /log groundball
2024-12-06 00:46:49 -06:00
Cal Corum
d6d3d7beb0 Log stealing done
Log xchecks started
2024-11-25 13:17:51 -06:00
Cal Corum
073bd04b4b Added RosterLinks to remove card_id from setup process
Add SelectStartingPitcher dropdown
New .sync function
2024-11-23 19:53:48 -06:00
Cal Corum
a4af7652fc ask_confirm bug fix
manual_end_game complete
2024-11-21 10:38:39 -06:00
Cal Corum
7a718d45f0 AbRoll and JumpRoll objects
Add handedness to pitcher/batter
2024-11-20 21:31:31 -06:00
Cal Corum
f7685ff0e3 Added AbRoll and JumpRoll
Added auto_roll and roll_buttons to Game
Added log chaos
2024-11-17 14:57:54 -06:00
Cal Corum
bfd72ae0f5 Update logging to RotatingFileHandler
Add auto game end
Calculate stats and decisions
Support raising instantiated exceptions
2024-11-09 23:14:54 -06:00
Cal Corum
c3418c4dfd New show-card dropdown view
Added PlayInitException
Added complete_and_post_play for log commands
Added many more log plays
Add undo-play
Added query logging
2024-11-09 00:48:13 -06:00
Cal Corum
fc3b407f2d ask_confirm helper added to buttons
Singles are complete
Doubles are complete
Uncapped advance is complete
2024-11-08 10:10:30 -06:00
Cal Corum
933f4ade43 Add utilities.embeds 2024-11-03 21:55:25 -06:00
Cal Corum
428afe048e Finish loading utilities
Push queries from _models to _queries
2024-10-14 12:22:05 -05:00
Cal Corum
63e738d048 Added dropdowns to utilities 2024-10-14 01:37:30 -05:00
Cal Corum
c253ae90a3 Migrate Confirm class to utilities 2024-10-14 01:17:09 -05:00