Interface CommandContextExtn

Hierarchy

  • CommandContextExtn

Properties

Properties

args: string[]

Command args parsed into an array.

Examples:

/command token1 token2 -> [ "token1", "token2" ]
/command "token1 token2" -> [ "token1 token2" ]
/command token1 "token2 token3" -> [ "token1" "token2 token3" ]

Unstable

Parser implementation might vary until considered stable

command: string

Matched command. This will always be the actual command, excluding preceeding slash and @botname

Examples:

/command abc -> command
/command@xyzbot abc -> command
match: RegExpExecArray
payload: string

The unparsed payload part of the command

Examples:

/command abc def -> "abc def"
/command "token1 token2" -> "\"token1 token2\""

Generated using TypeDoc