From 8a20c1f50a283949d097483b9372aedd83ea4ced Mon Sep 17 00:00:00 2001 From: alwayscompiling Date: Sun, 3 Jul 2022 22:34:16 -0400 Subject: [PATCH] Solved message deletion. --- cogs/score/verification_view.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cogs/score/verification_view.py b/cogs/score/verification_view.py index eee84cb..4344da2 100644 --- a/cogs/score/verification_view.py +++ b/cogs/score/verification_view.py @@ -1,6 +1,5 @@ """View for verification buttons""" -from code import interact import nextcord from utilities.utils import submit_score # pylint: disable=import-error @@ -23,7 +22,7 @@ class VerificationView(nextcord.ui.View): score = content[3] await submit_score(interaction, user, boss_name, category, score) - await interaction.delete_original_message # TODO doesn't work + await interaction.message.delete() await interaction.channel.send( f"Approved: {boss_name} {category} {user} {score}", files=[await attch.to_file() for attch in interaction.message.attachments], @@ -34,5 +33,4 @@ class VerificationView(nextcord.ui.View): self, button: nextcord.ui.Button, interaction: nextcord.Interaction ): # pylint: disable=unused-argument """Button for denying score submission.""" - await interaction.response.send_message("Denied") - await interaction.delete_original_message + await interaction.message.delete()