From 2ab82aa2bfcf0a0b68b62e439dc7533731c4a554 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Wed, 28 Jan 2026 16:01:31 -0600 Subject: [PATCH] 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 --- views/custom_commands.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/views/custom_commands.py b/views/custom_commands.py index c070c0c..5033504 100644 --- a/views/custom_commands.py +++ b/views/custom_commands.py @@ -592,11 +592,21 @@ class SingleCommandManagementView(BaseView): await confirmation_view.wait() if confirmation_view.result: - # User confirmed deletion - embed = EmbedTemplate.success( - title="Command Deleted", - description=f"The command `/cc {self.command.name}` has been deleted." - ) + # User confirmed deletion - actually delete the command + try: + await custom_commands_service.delete_command( + 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) else: # User cancelled