Fix custom command delete permission check using wrong ID field

Changed from command.creator_id (database ID) to command.creator.discord_id
to properly compare against the deleter's Discord user ID.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Cal Corum 2026-01-28 16:10:52 -06:00
parent 4fb3bcef51
commit b5365f01f9
2 changed files with 2 additions and 2 deletions

View File

@ -1 +1 @@
2.28.1
2.28.2

View File

@ -239,7 +239,7 @@ class CustomCommandsService(BaseService[CustomCommand]):
command = await self.get_command_by_name(name)
# Check permissions (unless force delete)
if not force and command.creator_id != deleter_discord_id:
if not force and command.creator.discord_id != deleter_discord_id:
raise CustomCommandPermissionError("You can only delete commands you created")
# Delete via API