diff options
author | 2022-11-26 13:15:34 +0000 | |
---|---|---|
committer | 2022-11-26 13:15:34 +0000 | |
commit | f47c864d57b42b28c3265f032162e4d5816bc51a (patch) | |
tree | 3fc6453753c40b82587f01c4957a278daa218ca1 | |
parent | Update 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.py | 5 |
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) |