Class CommandObject
A CommandObject
represents the configuration/state for a single command.
Inherits from
-
Object
(base class)
Constructors
Name | Description |
---|---|
this
|
Fields
Name | Type | Description |
---|---|---|
description
|
string |
The description / help text for the command
|
enabled
|
bool |
Whether this command is enabled
|
func
|
void delegate(CommandEvent) |
The function handler for this command |
level
|
int |
The permissions level required for the command
|
Properties
Name | Type | Description |
---|---|---|
name
[get]
|
string |
Returns the command name (always the first trigger in the list).
|
Methods
Name | Description |
---|---|
addTrigger
|
Adds a trigger for this command
|
match
|
Returns a Regex capture group matched against the commands regex. |
setGroup
|
Sets this commands group
|
setRegex
|
Sets whether this command uses regex matching |
setTriggers
|
Sets this commands triggers
|