From 2bdd46a496c94bd56181c6a4c41a2b7ebaf3bac8 Mon Sep 17 00:00:00 2001 From: n0Oo0Oo0b Date: Fri, 18 Aug 2023 19:52:31 +0800 Subject: Prevent ghost pings when reminder modification is cancelled --- bot/exts/utils/reminders.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot/exts/utils/reminders.py b/bot/exts/utils/reminders.py index f7d29eff2..07e014dd0 100644 --- a/bot/exts/utils/reminders.py +++ b/bot/exts/utils/reminders.py @@ -70,7 +70,7 @@ class ModifyReminderConfirmationView(discord.ui.View): @discord.ui.button(label="Cancel", row=0) async def cancel(self, interaction: Interaction, button: discord.ui.Button) -> None: """Cancel the reminder modification.""" - await interaction.response.edit_message(content="🚫 Operation canceled.", view=None) + await interaction.response.edit_message(view=None) self.result = False self.stop() @@ -597,6 +597,7 @@ class Reminders(Cog): if confirmation_view.result: log.debug(f"{ctx.author} has confirmed reminder modification.") else: + await ctx.send("🚫 Operation canceled.") log.debug(f"{ctx.author} has cancelled reminder modification.") return confirmation_view.result -- cgit v1.2.3