paper-dynasty-discord/helpers
Cal Corum c0f9466e54 CLAUDE: Fix /reset-image AttributeError by updating owner_only function
The owner_only() function was accessing ctx.author.id, which caused an
AttributeError when called with Interaction objects from slash commands
(which use .user instead of .author).

Updated both utils.py and helpers/utils.py to handle both Context and
Interaction objects by checking for .user first, then falling back to
.author for backward compatibility with traditional commands.

Fixes: Command 'reset-image' raised an exception: AttributeError:
'Interaction' object has no attribute 'author'

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 08:21:17 -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 Cogs to Packages Groundwork 2025-08-17 08:46:55 -05: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 /reset-image AttributeError by updating owner_only function 2025-11-10 08:21:17 -06:00