Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
46 lines (40 sloc) 1.28 KB
#! ========================================
#! Help
handler = (msg, match, H) ->
tokens = match.input.tokenize()
if /^(?:help|h)/i.test tokens[0]
for fn in H.functions
if fn.regex.test tokens[1]
allHelpList = """
Here’s a list of all my commands. Arguments in `<angle brackets>` \
are required, and those in `[regular brackets]` are optional.
For help for a specific command, use `-h help <command>`.
=== Commands ===
( for fn in H.functions)
.filter (x) -> not x.hidden
.map (x) -> x.short
.join '\n'
""" allHelpList
module.exports = {
name: "Help"
regex: /(?:^(?:help|h)(\s+|$))|(?:^\s*$)/i
handler: handler
short: "-h help [...] ::
This list. What did you expect?"
long: """
=== Help for Help (so meta) ===
*Aliases*: help, h
-h help :: Returns a help menu listing all the commands.
-h help [command] :: Returns a help menu for that specific
command, much like this one.
You can’t perform that action at this time.