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