CommandObject

A CommandObject represents the configuration/state for a single command.

Members

Functions

addTrigger
void addTrigger(string trigger)

Adds a trigger for this command

match
Captures!string match(string msg)

Returns a Regex capture group matched against the command's regex.

setGroup
void setGroup(string group)

Sets this command's group

setRegex
void setRegex(bool rgx)

Sets whether this command uses regex matching

setTriggers
void setTriggers(string[] triggers)

Sets this command's triggers

Properties

name
string name [@property getter]

Returns the command name (always the first trigger in the list).

Variables

description
string description;

The description / help text for the command

enabled
bool enabled;

Whether this command is enabled

func
CommandHandler func;

The function handler for this command

level
int level;

The permissions level required for the command

pre
CommandHandlerWrapper[] pre;

Function to run before main command handler.

Meta