Python discord.ext.commands.HelpCommand() Examples

The following are 2 code examples of discord.ext.commands.HelpCommand(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module discord.ext.commands , or try the search function .
Example #1
Source File: help.py    From avrae with GNU General Public License v3.0 6 votes vote down vote up
def add_command_formatting(self, command):
        """A utility function to format the non-indented block of commands and groups.

        Parameters
        ------------
        command: :class:`Command`
            The command to format.
        """

        signature = self.get_command_signature(command)
        self.embed_paginator.add_field(name=signature)

        if command.description:
            self.embed_paginator.extend_field(command.description)

        if command.help:
            try:
                self.embed_paginator.extend_field(command.help)
            except ValueError:
                for line in command.help.splitlines():
                    self.embed_paginator.extend_field(line)

    # ===== HelpCommand overrides ===== 
Example #2
Source File: help.py    From xenon with GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, bot):
        self.bot = bot
        self._original_help_command = bot.help_command
        bot.help_command = HelpCommand(verify_checks=False)
        bot.help_command.cog = self