diff options
| -rw-r--r-- | bot/exts/info/help.py | 10 | 
1 files changed, 6 insertions, 4 deletions
diff --git a/bot/exts/info/help.py b/bot/exts/info/help.py index 518330370..6c262e355 100644 --- a/bot/exts/info/help.py +++ b/bot/exts/info/help.py @@ -20,6 +20,8 @@ log = logging.getLogger(__name__)  COMMANDS_PER_PAGE = 8  PREFIX = constants.Bot.prefix +NOT_ALLOWED_TO_RUN_MESSAGE = "***You cannot run this command.***\n\n" +  Category = namedtuple("Category", ["name", "description", "cogs"]) @@ -174,15 +176,15 @@ class CustomHelpCommand(HelpCommand):              command_details += f"**Can also use:** {aliases}\n\n"          # when command is disabled, show message about it, -        # when other CommandError instance is raised, log warning about it -        # otherwise check if the user is allowed to run this command +        # when other CommandError or user is not allowed to run command, +        # add this to help message.          try:              if not await command.can_run(self.context): -                command_details += "***You cannot run this command.***\n\n" +                command_details += NOT_ALLOWED_TO_RUN_MESSAGE          except DisabledCommand:              command_details += "***This command is disabled.***\n\n"          except CommandError: -            command_details += "***You cannot run this command.***\n\n" +            command_details += NOT_ALLOWED_TO_RUN_MESSAGE          command_details += f"*{command.help or 'No details provided.'}*\n"          embed.description = command_details  |