The command context table type contains the contextual information about a command invocation.
The args field contains a sequential table with the arguments specified, including the unprefixed name of the command that invoked the command and any blank entries are skipped.
For example, !exrate 20 eur <indeterminate amount of spaces here> usd
will results in a Lua table that looks like { [1] = 'exrate', [2] = '20', [3] = 'eur', [4] = 'usd' }
.
The msg field contains a message type table with the details of the message that invoked this command.
The send field contains a function that can be used to send a message in the channel that a command was invoked in. If the invoking message was sent in a public channel, the text issued to this command will be sent as a message in that channel, if the user sent the command through a direct message, the message will be sent as a direct message to that user.
send(text: string): ()
This function has no return values.
The respond field contains a function that can be used to send a direct message to the user that invoked the command.
respond(text: string): ()
This function has no return values.