major-domo-v2/commands/profile
Cal Corum c41166d53c feat: add is_admin() helper to utils/permissions.py (#55)
Add centralized `is_admin(interaction)` helper that includes the
`isinstance(interaction.user, discord.Member)` guard, preventing
AttributeError in DM contexts.

Use it in `can_edit_player_image()` which previously accessed
`guild_permissions.administrator` directly without the isinstance
guard. Update the corresponding test to mock the user with
`spec=discord.Member` so the isinstance check passes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 09:37:22 -05:00
..
__init__.py Fix profile commands package not returning expected tuple 2026-01-13 16:25:38 -06:00
CLAUDE.md CLAUDE: Add comprehensive CLAUDE.md documentation files for AI agent guidance 2025-10-20 20:30:07 -05:00
images.py feat: add is_admin() helper to utils/permissions.py (#55) 2026-03-09 09:37:22 -05:00