Commit Graph

4 Commits

Author SHA1 Message Date
Cal Corum
7bb191dbf4 Add app_legal_channel to helpers package (fixes import error)
Bug: Version 1.7.5 added app_legal_channel to helpers.py but production uses
the helpers/ package which imports from helpers/main.py. This caused:
- NameError: name 'app_legal_channel' is not defined
- ImportError: cannot import name 'app_legal_channel' from 'helpers'

Result: cogs.economy and cogs.players failed to load, causing all slash
commands (including /team, /selldupes, /comeonmanineedthis) to be unavailable.

Fix: Add app_legal_channel() function to helpers/main.py so it's exported
via the helpers package __init__.py.

Bumps version to 1.7.6

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 09:23:27 -06:00
Cal Corum
af49704272 Catchup files 2025-11-11 13:22:06 -06:00
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