Fix custom command delete not actually deleting from database

The delete confirmation was showing success but never calling the delete
service. Added the actual delete_command() call when user confirms.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Cal Corum 2026-01-28 16:01:31 -06:00
parent 484042e8ae
commit 2ab82aa2bf

View File

@ -592,11 +592,21 @@ class SingleCommandManagementView(BaseView):
await confirmation_view.wait() await confirmation_view.wait()
if confirmation_view.result: if confirmation_view.result:
# User confirmed deletion # User confirmed deletion - actually delete the command
embed = EmbedTemplate.success( try:
title="Command Deleted", await custom_commands_service.delete_command(
description=f"The command `/cc {self.command.name}` has been deleted." name=self.command.name,
) deleter_discord_id=interaction.user.id
)
embed = EmbedTemplate.success(
title="Command Deleted",
description=f"The command `/cc {self.command.name}` has been deleted."
)
except Exception as e:
embed = EmbedTemplate.error(
title="Delete Failed",
description=f"Failed to delete command: {e}"
)
await interaction.edit_original_response(embed=embed, view=None) await interaction.edit_original_response(embed=embed, view=None)
else: else:
# User cancelled # User cancelled