Cal Corum
943dcc9b74
CLAUDE: Add get_context_user() helper for hybrid command compatibility
...
Created get_context_user() helper function to safely extract the user from
either Context or Interaction objects. This prevents AttributeError issues
when hybrid commands are invoked as slash commands.
Hybrid commands receive commands.Context (with .author) when invoked with
prefix commands, but discord.Interaction (with .user) when invoked as slash
commands. The helper function handles both cases transparently.
Updated all affected hybrid commands:
- /branding-pd (cogs/players.py, cogs/players_new/team_management.py)
- /pullroster (cogs/players.py, cogs/players_new/team_management.py)
- /newsheet (cogs/economy_new/team_setup.py)
- /lastpack (cogs/economy_new/packs.py)
This follows the same pattern as the owner_only() fix and provides a
consistent, maintainable solution for all hybrid commands.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 09:07:09 -06:00
Cal Corum
660c6ad904
Added search functionality to /player command
2025-10-08 14:45:41 -05:00
Cal Corum
b1d05309ef
Cogs to Packages Groundwork
2025-08-17 08:46:55 -05:00
Cal Corum
6a355def4b
Season 9 Updates
2025-05-03 19:38:29 -05:00
Cal Corum
cffc9380f1
Replacing 1998 Live with 1998 Season
2025-04-14 16:28:14 -05:00
Cal Corum
cb2637086e
Live scorecard fix
...
Gauntlet entry string fix
2025-03-31 13:54:39 -05:00
Cal Corum
50895fef90
Show charts on SPD checks
...
Fix gb chart with OBC 5, 7
Add 1998 to player command
2025-02-10 23:44:05 -06:00
Cal Corum
d5f2978b01
Update new-game flow
2025-02-06 15:12:12 -06:00
Cal Corum
3b6bcfb186
Beta day 1 bug fixes
2025-02-02 22:01:33 -06:00
Cal Corum
3d41ec1662
Remove static gauntlet run options
2024-12-18 09:59:27 -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
46860fb3c0
/read-lineup logic is complete
2024-10-14 20:46:55 -05:00
Cal Corum
512efe98c4
db_calls -> api_calls
...
gameplay_db -> gameplay_models
new-game campaign in progress
added Player model
2024-10-12 18:22:13 -05:00
Cal Corum
ccaf61e73a
Update 2024 Live to 2024 Season
2024-10-11 08:45:32 -05:00
Cal Corum
d50595d49a
Added /gauntlets reset
2024-07-26 16:54:23 -05:00
Cal Corum
701e89eaf2
Early pass at matchup sim and added is_fatigued to Lineup
2024-07-07 23:13:22 -05:00
Cal Corum
f7934d464f
Refactoring gameplay AI / Automate subs
2024-05-19 02:12:35 -05:00
Cal Corum
3127bf2df8
Add support for 2024 Live gauntlet
2024-05-13 15:36:10 -05:00
Cal Corum
0035090ad9
Fix weekly automation
2024-04-27 07:43:44 -05:00
Cal Corum
a40c1c9e93
2024 Updates
2024-04-21 17:49:10 -05:00
Cal Corum
04201be18c
Fix notifications and SUC gauntlet
2024-03-08 11:14:05 -06:00
Cal Corum
f65ec66724
Added Backyard Baseball Gauntlet
2024-03-08 00:47:58 -06:00
Cal Corum
462525ab5c
Bug fixes for 3-inning and Ranked games
2023-11-29 10:33:37 -06:00
Cal Corum
502759d6cd
Activate Flashback campaign
2023-11-20 00:59:49 -06:00
Cal Corum
e2e114d06a
Add Task Loop Check
2023-11-17 22:17:40 -06:00
Cal Corum
1c3e7ef148
Bug fixes & /record
...
- Added walk-off scenario for end-game
2023-10-26 00:36:36 -05:00
Cal Corum
8339eb63eb
Add /lookup command & fix mvp choice pack
2023-10-24 23:44:42 -05:00
Cal Corum
f68a8166e7
2018 Cardset Update
2023-10-23 10:57:28 -05:00
Cal Corum
96f783bb63
2018 gauntlet in place
2023-10-23 00:58:10 -05:00
Cal Corum
30ea1f300a
Update 2023 Live cardset name to 2023 Season
2023-10-22 16:42:14 -05:00
Cal Corum
5668b7f04e
Added /update-player command
2023-10-22 14:00:06 -05:00
Cal Corum
72d6129b17
Player description update & bugfixes
...
Fixed trail runners not advancing for uncapped doubles and steals of home
2023-10-21 15:30:14 -05:00
Cal Corum
ebfab450b9
Update players.py
...
Update /player pagination to only fire with more than one card
2023-10-17 21:19:52 -05:00
Cal Corum
0155eb0631
Updated rare play and added /player pagination
2023-10-16 16:33:18 -05:00
Cal Corum
125a4b5918
Add batting stats to /player
2023-09-09 17:47:01 -05:00
Cal Corum
48b10bfaec
Speedup Updates
...
Update initial player pull
Move substitution command to app_command
2023-09-09 15:59:04 -05:00
Cal Corum
baab989507
Cardset support
2023-06-15 09:21:01 -05:00
Cal Corum
87a44d03f0
2008, 2016, Flashback Gauntlet Live!
2023-05-29 19:48:48 -05:00
Cal Corum
d1f82eb58e
Add rare plays, 2016, and 2008
2023-05-28 13:15:28 -05:00
Cal Corum
f5bf7df166
DB calls to async
2023-05-03 13:28:14 -05:00
Cal Corum
a2608fd479
Update players.py
...
error handling
2023-05-02 12:23:22 -05:00
Cal Corum
e72655d3dc
Update players.py
...
card-lookup command
2023-05-02 12:02:21 -05:00
Cal Corum
9f9dc05073
Add gauntlet record to embed
2023-04-27 00:14:29 -05:00
Cal Corum
d74d2b3ac5
Add 23 Season as options
2023-04-25 10:22:06 -05:00
Cal Corum
c1ff723612
Gauntlets public release
...
Add MSS to /paperdex, add get_relief_pitcher logic, add MSS to /player, remove excess logging
2023-04-09 17:08:02 -05:00
Cal Corum
7fd88e7362
Update players.py
...
Longs drafts timeout interaction; switch to send_to_channel since it uses the bot
2023-03-31 08:58:59 -05:00
Cal Corum
a506f223d8
Day 1 Gauntlet patch
2023-03-30 10:56:18 -05:00
Cal Corum
91f1b028a5
Graceful draft cancellation
2023-03-28 12:07:37 -05:00
Cal Corum
84fa202360
Channel check for draft
2023-03-28 11:10:44 -05:00
Cal Corum
e406ecd1bc
Update gauntlet messages
2023-03-28 10:57:11 -05:00