aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar n0Oo0Oo0b <[email protected]>2023-08-18 19:52:31 +0800
committerGravatar n0Oo0Oo0b <[email protected]>2023-08-26 23:44:16 +0800
commit2bdd46a496c94bd56181c6a4c41a2b7ebaf3bac8 (patch)
tree6c2b02a5c6a343c0f1bd562f1772ad89eee5dd0a
parentEnsure view gets deleted if view times out (diff)
Prevent ghost pings when reminder modification is cancelled
-rw-r--r--bot/exts/utils/reminders.py3
1 files changed, 2 insertions, 1 deletions
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