module Command: sig
.. end
type
action =
The actions that can be used by the bot's commands
type
command = {
}
This type is used to represent available commands. The `name` field is the command's name (without a slash) and the `description` field is the description to be used in the help message. `run` is the function called when invoking the command.
val is_command : Api.Update.update -> bool
Tests to see whether an update from the update queue invoked a command
val read_command : Api.Message.message -> command list -> action
Takes a message, known to represent a command, and a list of possible commands. These values are used to find the matching command and return the actions that it should perform
val read_update : Api.Update.update -> command list -> action
Reads a single update and, given a list of commands, matches it to a correct command that can be invoked
val tokenize : string -> string list
Turns a string into the args list that a command may choose to work with