CommandObject

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

Constructors

this
this(CommandHandler func, T t)

Takes an aliasSeq of arguments from getUDAs, which automatically expands for as many UDAs as are given

Members

Functions

addTrigger
void addTrigger(string trigger)

Adds a trigger for this command

call
void call(CommandEvent e)

Call a command event

match
Captures!string match(string msg)

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

name
string name()

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

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

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