aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Andi Qu <[email protected]>2021-04-27 18:28:49 +0200
committerGravatar GitHub <[email protected]>2021-04-27 18:28:49 +0200
commitc01caf42401b6d029014f90a52966ee55a649194 (patch)
tree7f5accd1b9ddc1776ee0dc2a532b1e9d9bc9ea59
parentRedirect to #bot-commands if the message's length is > 1000 (diff)
Wait for cache to fill before redirecting
-rw-r--r--bot/exts/info/code_snippets.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/bot/exts/info/code_snippets.py b/bot/exts/info/code_snippets.py
index d93ace31c..6ebc5e74b 100644
--- a/bot/exts/info/code_snippets.py
+++ b/bot/exts/info/code_snippets.py
@@ -239,6 +239,7 @@ class CodeSnippets(Cog):
await message.edit(suppress=True)
if len(message_to_send) > 1000 and message.channel.id != Channels.bot_commands:
# Redirects to #bot-commands if the snippet contents are too long
+ await self.bot.wait_until_guild_available()
await message.channel.send(('The snippet you tried to send was too long. Please '
f'see <#{Channels.bot_commands}> for the full snippet.'))
bot_commands_channel = self.bot.get_channel(Channels.bot_commands)