aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-08-04 12:44:18 -0700
committerGravatar MarkKoz <[email protected]>2020-08-04 13:51:04 -0700
commit6f31a1141b513dd6031949467e5409df0d6a3181 (patch)
tree7950bdc76aa03c730b504803332a188573201eaf
parentHelpChannels: add more detail to unpin log messages (diff)
HelpChannels: don't unpin message if ID is None
Fixes #1082 Fixes BOT-7G
-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)