aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/cogs/help_channels.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py
index b06934eff..2c53069f0 100644
--- a/bot/cogs/help_channels.py
+++ b/bot/cogs/help_channels.py
@@ -556,8 +556,11 @@ class HelpChannels(Scheduler, commands.Cog):
try:
await self.bot.http.unpin_message(channel.id, msg_id)
- except discord.HTTPException:
- log.trace(f"Message {msg_id} don't exist, can't unpin.")
+ except discord.HTTPException as e:
+ if e.code == 10008:
+ log.trace(f"Message {msg_id} don't exist, can't unpin.")
+ else:
+ log.warn(f"Got unexpected status {e.code} when unpinning message {msg_id}: {e.text}")
else:
log.trace(f"Unpinned message {msg_id}.")