aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-02-27 20:20:06 -0800
committerGravatar MarkKoz <[email protected]>2020-03-22 15:54:40 -0700
commit05ea5a932c0e8941d22e64f3a616772876816018 (patch)
tree644a2cd9332883eb3b3c06938c5a3ea8f0553cfd
parentHelpChannels: sort dormant channels alphabetically (diff)
HelpChannels: add a warning if more than 50 channels exist
Discord only supports 50 channels per category. The help system will eventually error out trying to move channels if more than 50 exist.
-rw-r--r--bot/cogs/help_channels.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py
index 0f700a9ba..4aad55cfe 100644
--- a/bot/cogs/help_channels.py
+++ b/bot/cogs/help_channels.py
@@ -235,6 +235,12 @@ class HelpChannels(Scheduler, commands.Cog):
name = channel.name[start_index:]
names.add(name)
+ if len(names) > MAX_CHANNELS_PER_CATEGORY:
+ log.warning(
+ f"Too many help channels ({len(names)}) already exist! "
+ f"Discord only supports {MAX_CHANNELS_PER_CATEGORY} in a category."
+ )
+
log.trace(f"Got {len(names)} used names: {names}")
return names