commit 9ddba0d9b1887485b4efc5abd35a0ee18e62a1c3
parent ceaabe3daca31eef8b0daa6fc04b24b9a80f58c0
Author: Emily Doherty <git@emily.sh>
Date: Sat, 14 Dec 2024 20:38:12 -0800
Supress an error raised from deferring
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git 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])