aboutsummaryrefslogtreecommitdiff
path: root/modules/builtins/help.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/builtins/help.py')
-rw-r--r--modules/builtins/help.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/builtins/help.py b/modules/builtins/help.py
new file mode 100644
index 0000000..523d86d
--- /dev/null
+++ b/modules/builtins/help.py
@@ -0,0 +1,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)