Skip to content

Custom help command #252

Answered by veni-vidi-code
s0r3-glitch asked this question in Q&A
Nov 10, 2021 · 2 comments · 10 replies
Discussion options

You must be logged in to vote

From R. Danny (https://discord.com/channels/336642139381301249/559455534965850142/907961071330005052):
Create your own help command by subclassing HelpCommand or MinimalHelpCommand, then passing it to bot.help_command:

class MyHelpCommand(commands.MinimalHelpCommand):
    def get_command_signature(self, command):
        return '{0.clean_prefix}{1.qualified_name} {1.signature}'.format(self, command)

class MyCog(commands.Cog):
    def __init__(self, bot):
        self._original_help_command = bot.help_command
        bot.help_command = MyHelpCommand()
        bot.help_command.cog = self

    def cog_unload(self):
        self.bot.help_command = self._original_help_command

or, you can set …

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
1 reply
@veni-vidi-code
Comment options

Comment options

You must be logged in to vote
9 replies
@s0r3-glitch
Comment options

@s0r3-glitch
Comment options

@DenverCoder1
Comment options

@s0r3-glitch
Comment options

@DenverCoder1
Comment options

Answer selected by TAG-Epic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants