aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/cogs/help_channels.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py
index e281615c2..5e09e0a88 100644
--- a/bot/cogs/help_channels.py
+++ b/bot/cogs/help_channels.py
@@ -858,6 +858,9 @@ class HelpChannels(commands.Cog):
channel_str = f"#{channel} ({channel.id})"
msg_id = await self.question_messages.pop(channel.id)
+ if msg_id is None:
+ log.debug(f"{channel_str} doesn't have a message pinned.")
+ return
try:
await self.bot.http.unpin_message(channel.id, msg_id)