From a58e0687845cf8d6aafb559f24b092bc1f4af047 Mon Sep 17 00:00:00 2001 From: MarkKoz Date: Thu, 27 Feb 2020 09:18:03 -0800 Subject: HelpChannels: limit channels to a total of 50 Discord has a hard limit of 50 channels per category. It was decided 50 is plenty for now so no work will be done to support more than 50. --- bot/cogs/help_channels.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py index b85fac4f1..2710e981b 100644 --- a/bot/cogs/help_channels.py +++ b/bot/cogs/help_channels.py @@ -46,7 +46,9 @@ through [our guide for asking a good question]({ASKING_GUIDE_URL}). """ with Path("bot/resources/elements.json").open(encoding="utf-8") as elements_file: - ELEMENTS = json.load(elements_file) + # Discord has a hard limit of 50 channels per category. + # Easiest way to prevent more channels from being created is to limit the names available. + ELEMENTS = json.load(elements_file)[:50] class ChannelTimeout(t.NamedTuple): -- cgit v1.2.3