[commands] Add Bot.help_attrs to customise the help command.

The help message now uses the invoked_with attribute of the context to
get the name of the command it uses instead of a hardcoded help.
This commit is contained in:
Rapptz
2016-01-23 03:43:54 -05:00
parent abbe79919b
commit bb5e222f29
2 changed files with 18 additions and 4 deletions

View File

@@ -160,8 +160,9 @@ class HelpFormatter:
return ' '.join(result)
def get_ending_note(self):
return "Type {0}help command for more info on a command.\n" \
"You can also type {0}help category for more info on a category.".format(self.clean_prefix)
command_name = self.context.invoked_with
return "Type {0}{1} command for more info on a command.\n" \
"You can also type {0}{1} category for more info on a category.".format(self.clean_prefix, command_name)
def filter_command_list(self):
"""Returns a filtered list of commands based on the two attributes