aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Senjan21 <[email protected]>2020-07-30 13:54:55 +0200
committerGravatar Senjan21 <[email protected]>2020-07-30 13:54:55 +0200
commitf97defcab304e6f2e3175f10e9888db30a0be0c8 (patch)
tree28d338e5b1f2ee3b4f585c48cc20bf2f8d54257f
parentMerge pull request #1071 from python-discord/no_mod_alert_ping_for_dms (diff)
Fix channel moving incase `message.pin` fails
-rw-r--r--bot/cogs/help_channels.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py
index 1f87c3e39..5d4346000 100644
--- a/bot/cogs/help_channels.py
+++ b/bot/cogs/help_channels.py
@@ -701,6 +701,8 @@ class HelpChannels(commands.Cog):
await message.pin()
except discord.NotFound:
log.info(f"Pinning message {message.id} ({channel}) failed because message got deleted.")
+ except discord.HTTPException as e:
+ log.info(f"Pinning message {message.id} ({channel.id}) failed with code {e.code}", exc_info=e)
else:
await self.question_messages.set(channel.id, message.id)