diff options
| author | 2020-02-27 09:18:03 -0800 | |
|---|---|---|
| committer | 2020-03-22 15:54:39 -0700 | |
| commit | a58e0687845cf8d6aafb559f24b092bc1f4af047 (patch) | |
| tree | 3f432ace27bc6f456c6936432015afef6bb4d9e2 | |
| parent | HelpChannels: explain the system in the cog docstring (diff) | |
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.
| -rw-r--r-- | bot/cogs/help_channels.py | 4 |
1 files changed, 3 insertions, 1 deletions
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): |