diff options
Diffstat (limited to '')
| -rw-r--r-- | bot/cogs/help_channels.py | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py index 60580695c..2e203df46 100644 --- a/bot/cogs/help_channels.py +++ b/bot/cogs/help_channels.py @@ -223,13 +223,14 @@ class HelpChannels(Scheduler, commands.Cog):      @staticmethod      def get_clean_channel_name(channel: discord.TextChannel) -> str:          """Return a clean channel name without status emojis prefix.""" +        prefix = constants.HelpChannels.name_prefix          try: -            # Try to remove the status prefix using the index of "help-" -            name = channel.name[channel.name.index("help-"):] +            # Try to remove the status prefix using the index of the channel prefix +            name = channel.name[channel.name.index(prefix):]              log.trace(f"The clean name for `{channel}` is `{name}`")          except ValueError:              # If, for some reason, the channel name does not contain "help-" fall back gracefully -            log.info(f"Can't get clean name as `{channel}` does not follow the `help-` naming convention.") +            log.info(f"Can't get clean name as `{channel}` does not follow the `{prefix}` naming convention.")              name = channel.name          return name | 
