Paper Dynasty Discord - Discord bot for card game
Go to file
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
.plans Cogs to Packages Groundwork 2025-08-17 08:46:55 -05:00
.vscode Catchup commit 2025-07-22 09:22:19 -05:00
cogs CLAUDE: Fix gauntlet game creation and Event 9 issues 2025-11-09 18:56:38 -06:00
command_logic S10 Updates + PR Bugfix 2025-11-09 06:12:46 -06:00
discord_ui Cogs to Packages Groundwork 2025-08-17 08:46:55 -05:00
helpers Added search functionality to /player command 2025-10-08 14:45:41 -05:00
in_game Added search functionality to /player command 2025-10-08 14:45:41 -05:00
migrations Update cache refresh logic to replace vs delete 2025-02-23 22:50:58 -06:00
tests CLAUDE: Add safe WPA lookup with fallback to prevent KeyError crashes 2025-10-11 18:25:59 -05:00
utilities CLAUDE: Fix gauntlet game creation and Event 9 issues 2025-11-09 18:56:38 -06:00
.dockerignore Catchup commit 2025-07-22 09:22:19 -05:00
.gitignore Catchup commit 2025-07-22 09:22:19 -05:00
alembic.ini Added base alembic config 2024-10-11 16:42:15 -05:00
api_calls.py Catchup commit 2025-07-22 09:22:19 -05:00
constants.py S10 Updates + PR Bugfix 2025-11-09 06:12:46 -06:00
db_calls_gameplay.py Update logging to RotatingFileHandler 2024-11-09 23:14:54 -06:00
dice.py Remove outdate image links 2025-06-04 09:54:13 -05:00
discord_utils.py Cogs to Packages Groundwork 2025-08-17 08:46:55 -05:00
Dockerfile Added docker to environment 2024-10-12 02:04:30 -05:00
exceptions.py Catchup commit 2025-07-22 09:22:19 -05:00
gauntlets.py CLAUDE: Fix gauntlet game creation and Event 9 issues 2025-11-09 18:56:38 -06:00
help_text.py S10 Updates + PR Bugfix 2025-11-09 06:12:46 -06:00
helpers.py Cogs to Packages Groundwork 2025-08-17 08:46:55 -05:00
LICENSE Initial commit 2020-07-07 13:56:19 -05:00
manual_pack_distribution.py S10 Updates + PR Bugfix 2025-11-09 06:12:46 -06:00
paperdynasty.py Cogs to Packages Groundwork 2025-08-17 08:46:55 -05:00
pytest.ini Catchup commit 2025-07-22 09:22:19 -05:00
random_content.py Cogs to Packages Groundwork 2025-08-17 08:46:55 -05:00
requirements.txt Remove outdate image links 2025-06-04 09:54:13 -05:00
search_utils.py Catchup commit 2025-07-22 09:22:19 -05:00
utils.py Cogs to Packages Groundwork 2025-08-17 08:46:55 -05:00