From 9ddba0d9b1887485b4efc5abd35a0ee18e62a1c3 Mon Sep 17 00:00:00 2001 From: Emily Doherty Date: Sat, 14 Dec 2024 20:38:12 -0800 Subject: [PATCH] Supress an error raised from deferring --- token_bot/tracker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/token_bot/tracker.py b/token_bot/tracker.py index a192f6d..9862ba0 100644 --- a/token_bot/tracker.py +++ b/token_bot/tracker.py @@ -280,7 +280,7 @@ class Tracker(Extension): "Most interactions will happen in direct messages with GoblinBot here.\n" "You can remove your user data and alerts at any time using ```/remove-registration```\n" ) - await ctx.defer(edit_origin=True) + await ctx.defer(edit_origin=True, suppress_error=True) @component_callback("high_alert_button") async def high_alert_button(self, ctx: ComponentContext): @@ -441,7 +441,7 @@ class Tracker(Extension): raise TimeoutError else: menu.disabled = True - await component.ctx.defer(edit_origin=True) + await component.ctx.defer(edit_origin=True, suppress_error=True) await message.edit(context=ctx, components=menu) return AlertType.from_str(component.ctx.values[0])