Commit Graph

7 Commits

Author SHA1 Message Date
Cal Corum
565afd0183 Normalize Player.franchise queries to use Team.sname
- Add FRANCHISE_NORMALIZE dict and helper to constants.py
- Update economy.py to normalize team_choice and use sname
- Update helpers/main.py franchise queries to use sname
- Update selectors.py to normalize franchise on player updates

Part of cross-era player matching fix for AI rosters

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 12:01:00 -06:00
Cal Corum
5aa88e4e3d Fix Athletics Team Choice pack KeyError
Add 'Athletics' alias to ALL_MLB_TEAMS, IMAGES['mvp'], and AL_TEAM_IDS
to support both old franchise name ("Oakland Athletics") and new mlbclub
name ("Athletics") after the team's relocation.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 16:20:05 -06:00
Cal Corum
af49704272 Catchup files 2025-11-11 13:22:06 -06:00
Cal Corum
f7f37c9d95 CLAUDE: Handle Team Choice packs with no team/cardset assigned
Users were receiving "This interaction failed" when trying to open Team
Choice packs that had neither pack_team nor pack_cardset assigned in the
database.

The previous fix only handled packs WITH cardset but WITHOUT team. This
adds handling for completely unconfigured Team Choice packs.

Now shows a helpful error message: "This Team Choice pack needs to be
assigned a team and cardset. Please contact an admin to configure this pack."

This prevents the KeyError exception that was being thrown at
helpers.py:1692 when open_choice_pack() received a pack with pack_team=None.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 15:09:26 -06:00
Cal Corum
81373a9b42 CLAUDE: Fix Team Choice pack hanging by using interaction.followup.send()
When opening a Team Choice pack without a pre-assigned team, the bot would:
1. Edit the interaction to remove the pack selection view
2. Send team selection (AL/NL) via interaction.channel.send()
3. Return without sending a followup to the interaction
4. Discord left waiting for a response that never came

Changed interaction.channel.send() to interaction.followup.send() with
a helpful message explaining what's happening. This properly responds to
the interaction and allows the team selection dropdown to function.

The issue occurred at discord_ui/selectors.py:188 in SelectOpenPack callback.

Fixes: /open-packs command hangs when selecting 'Team Choice' pack type

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 09:53:50 -06:00
Cal Corum
b1d05309ef Cogs to Packages Groundwork 2025-08-17 08:46:55 -05:00
Cal Corum
3debfd6e82 Catchup commit
Includes discord_ui refactor, testing overhaul, addition of
2025-07-22 09:22:19 -05:00