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
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
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
e366564bef
Adding gauntlet 8
...
Season 9 updates
Uncapped runs scored bug fixed
2025-05-29 21:54:16 -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
f8aad38739
Update cache refresh logic to replace vs delete
2025-02-23 22:50:58 -06: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
282a7e7ac2
Added live scorecard functionality
...
Added new pitcher embed highlighting
2025-02-05 11:30:56 -06:00
Cal Corum
3b6bcfb186
Beta day 1 bug fixes
2025-02-02 22:01:33 -06:00
Cal Corum
7d54d9ea34
Add unlimited new-game
...
Add pitcher substitution
Add AI pitcher subs
2025-02-01 21:32:40 -06:00
Cal Corum
36dbde848e
new_game_checks refactor
2025-01-24 10:08:11 -06:00
Cal Corum
cd0a8a739a
Catchup edits
2025-01-23 10:59:03 -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
19cdf969d1
Merge branch 'master' into sqlmodel-alembic-pytests-rebuild
2024-12-24 14:51:59 -06:00
Cal Corum
9ea6829674
Day 1 Pokemon updates
2024-12-24 14:21:33 -06:00
Cal Corum
5f8a422c2c
Added Brilliant Stars gauntlet
2024-12-24 00:22:30 -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
8895a1afa1
Update promo choice pack rollover to LIVE_CARDSET
2024-11-05 12:08:58 -06:00
Cal Corum
650ffdb147
Begun complete_play function
2024-11-05 12:07:52 -06:00
Cal Corum
8da859b63a
Merge branch 'master' into sqlmodel-alembic-pytests-rebuild
2024-11-03 18:20:01 -06:00
Cal Corum
209dea2921
Add database environment variable
...
Fix team choice + cardset packs
2024-11-03 17:58:10 -06:00
Cal Corum
d02e973499
Prod push for Season 8 Updates
2024-11-03 13:38:41 -06:00
Cal Corum
7dfd077b94
Season 8 Updates
2024-11-02 19:47:54 -05:00
Cal Corum
97519fc8d5
Move db creation to entry
...
Nearing completion of new-game mlb-campaign
2024-10-13 00:25:29 -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
5d76a49583
Update to Python 3.12
...
Update new_game_campaign role check
2024-10-11 22:52:09 -05:00
Cal Corum
27baebb7bf
Problem cleanup
2024-10-11 20:14:10 -05:00
Cal Corum
ccaf61e73a
Update 2024 Live to 2024 Season
2024-10-11 08:45:32 -05:00
Cal Corum
78bcdc07bf
Add support for MVP packs with set team
2024-08-31 23:37:54 -05:00
Cal Corum
89daa5fa15
Add Dropdown class
2024-07-11 15:08:14 -05:00
Cal Corum
f7934d464f
Refactoring gameplay AI / Automate subs
2024-05-19 02:12:35 -05:00
Cal Corum
913689034c
Fixed interaction bug
2024-05-17 15:22:54 -05:00
Cal Corum
a1c44a0540
Refactor /buy pack
2024-05-13 17:02:32 -05:00
Cal Corum
731862e006
Add support for Promo Choice pack
2024-05-13 15:35:57 -05:00
Cal Corum
fdfcd05899
S9 bug fixes
2024-04-27 07:43:59 -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
67da23cc17
Add rare play support
2024-02-24 20:47:06 -06:00
Cal Corum
d1e731b57d
Add gif search and /reset-cache
2023-11-16 13:05:45 -06:00
Cal Corum
b941f1641e
Refactor /substitution to /substitute pitcher and batter
2023-10-31 00:17:46 -05:00
Cal Corum
c10fc7c22f
Update helpers.py
...
Add check for player update function
2023-10-30 21:15:38 -05:00
Cal Corum
1c3e7ef148
Bug fixes & /record
...
- Added walk-off scenario for end-game
2023-10-26 00:36:36 -05:00
Cal Corum
d15050242a
All-Star TC packs updated
2023-10-24 21:57:10 -05:00
Cal Corum
d6276ec22a
Activate Cardset-Locked Team Choice packs
2023-10-24 14:08:37 -05:00
Cal Corum
e0ef5616bd
Day 1 Updates
2023-10-24 09:48:46 -05:00
Cal Corum
f68a8166e7
2018 Cardset Update
2023-10-23 10:57:28 -05:00