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:
parent
4fb3bcef51
commit
b5365f01f9
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user