aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2022-11-26 13:15:34 +0000
committerGravatar Chris Lovering <[email protected]>2022-11-26 13:15:34 +0000
commitf47c864d57b42b28c3265f032162e4d5816bc51a (patch)
tree3fc6453753c40b82587f01c4957a278daa218ca1
parentUpdate botcore module name (diff)
Ignore Discord errors when clearing snekbox reactions
These errors can be caused by the message being deleted, or the message being in an archived thread
-rw-r--r--bot/exts/utils/snekbox.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bot/exts/utils/snekbox.py b/bot/exts/utils/snekbox.py
index 53012a5e1..8a2e68b28 100644
--- a/bot/exts/utils/snekbox.py
+++ b/bot/exts/utils/snekbox.py
@@ -402,15 +402,16 @@ class Snekbox(Cog):
return None, None
code = await self.get_code(new_message, ctx.command)
- await ctx.message.clear_reaction(REDO_EMOJI)
with contextlib.suppress(HTTPException):
+ await ctx.message.clear_reaction(REDO_EMOJI)
await response.delete()
if code is None:
return None, None
except asyncio.TimeoutError:
- await ctx.message.clear_reaction(REDO_EMOJI)
+ with contextlib.suppress(HTTPException):
+ await ctx.message.clear_reaction(REDO_EMOJI)
return None, None
codeblocks = await CodeblockConverter.convert(ctx, code)