From ca995f96292d8ff334696e89353e977999f4b6b0 Mon Sep 17 00:00:00 2001 From: MarkKoz Date: Mon, 24 Feb 2020 13:23:51 -0800 Subject: Constants: add a help channel name prefix constant --- bot/cogs/help_channels.py | 2 +- bot/constants.py | 1 + config-default.yml | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py index 3d7ece909..026cb1f78 100644 --- a/bot/cogs/help_channels.py +++ b/bot/cogs/help_channels.py @@ -107,7 +107,7 @@ class HelpChannels(Scheduler, commands.Cog): def get_used_names(self) -> t.Set[str]: """Return channels names which are already being used.""" - start_index = len("help-") + start_index = len(constants.HelpChannels.name_prefix) names = set() for cat in (self.available_category, self.in_use_category, self.dormant_category): diff --git a/bot/constants.py b/bot/constants.py index 58a236546..5b50050d6 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -540,6 +540,7 @@ class HelpChannels(metaclass=YAMLGetter): cmd_whitelist: List[int] idle_minutes: int max_available: int + name_prefix: str class Mention(metaclass=YAMLGetter): diff --git a/config-default.yml b/config-default.yml index 27143ff30..c095aa30b 100644 --- a/config-default.yml +++ b/config-default.yml @@ -525,6 +525,9 @@ help_channels: # Maximum number of channels to put in the available category max_available: 2 + # Prefix for help channel names + name_prefix: 'help-' + redirect_output: delete_invocation: true delete_delay: 15 -- cgit v1.2.3