diff options
| author | 2020-08-04 12:44:18 -0700 | |
|---|---|---|
| committer | 2020-08-04 13:51:04 -0700 | |
| commit | 6f31a1141b513dd6031949467e5409df0d6a3181 (patch) | |
| tree | 7950bdc76aa03c730b504803332a188573201eaf | |
| parent | HelpChannels: add more detail to unpin log messages (diff) | |
HelpChannels: don't unpin message if ID is None
Fixes #1082
Fixes BOT-7G
Diffstat (limited to '')
| -rw-r--r-- | bot/cogs/help_channels.py | 3 | 
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) | 
