aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/utils/messages.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/bot/utils/messages.py b/bot/utils/messages.py
index a5ed84351..cc7e6dccb 100644
--- a/bot/utils/messages.py
+++ b/bot/utils/messages.py
@@ -98,7 +98,14 @@ async def wait_for_deletion(
try:
await bot.instance.wait_for('reaction_add', check=check, timeout=timeout)
except asyncio.TimeoutError:
- await message.clear_reactions()
+ try:
+ await message.clear_reactions()
+ except discord.HTTPException as e:
+ if isinstance(message.channel, discord.Thread):
+ # Threads might not be accessible by the time we try to remove the reaction.
+ pass
+ else:
+ raise e
else:
await message.delete()
except discord.NotFound: