aboutsummaryrefslogtreecommitdiff
path: root/modules/builtins/help.py
blob: 523d86ddf3c9c76214284f90fead9835ea04dcf9 (plain)
1
2
3
4
5
6
7
8
9
10
from lib import CommandContext, get_all_commands, name, description, get_command_name, get_command_description


@name('help')
@description('lists all commands with their descriptions')
def help_command(ctx: CommandContext):
    resp = ""
    for command in get_all_commands():
        resp += '%s - %s\n' % (get_command_name(command), get_command_description(command))
    ctx.respond(resp)