paper-dynasty-discord/helpers
Cal Corum c2bbf94925 CLAUDE: Fix get_roster_sheet() to handle both dict and Team objects
Fixed TypeError: 'Team' object is not subscriptable error occurring at the
end of /gauntlet start command when sending completion messages.

The get_roster_sheet() function was using dict syntax (team["gsheet"]) but
was receiving Team objects from gauntlet commands. Updated the function to
handle both dict and Team object formats using isinstance() check.

This follows the same pattern as get_context_user() and owner_only() for
handling multiple input types gracefully.

Fixes: Command 'start' raised an exception: TypeError: 'Team' object is
not subscriptable (reported at end of gauntlet draft completion)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 09:11:37 -06:00
..
__init__.py Cogs to Packages Groundwork 2025-08-17 08:46:55 -05:00
constants.py Cogs to Packages Groundwork 2025-08-17 08:46:55 -05:00
discord_utils.py Cogs to Packages Groundwork 2025-08-17 08:46:55 -05:00
main.py CLAUDE: Add get_context_user() helper for hybrid command compatibility 2025-11-10 09:07:09 -06:00
random_content.py Cogs to Packages Groundwork 2025-08-17 08:46:55 -05:00
search_utils.py Cogs to Packages Groundwork 2025-08-17 08:46:55 -05:00
utils.py CLAUDE: Fix get_roster_sheet() to handle both dict and Team objects 2025-11-10 09:11:37 -06:00