def help(opts, bot, _):
    """Usage: help [<command>]

    With no arguments, print the form of all supported commands.
    With an argument, print a detailed explanation of a command.
    """
    command = opts['<command>']
    if command is None:
        return bot.help_text()

    if command not in bot.commands:
        return "%r is not a known command" % command

    return bot.commands[command].__doc__