new Command(data)
Create a command
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Object | The command data |
Properties:
| Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data.name |
String | The command name |
||||||||||||||||||||||||||||||||||||||||||||||||||||
data.desc |
String | The command description |
||||||||||||||||||||||||||||||||||||||||||||||||||||
data.options |
Object |
<optional> |
{} | The command options Properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||
data.action |
CommandAction | The command action |
Members
-
private _typePrefixes : Object
-
Argument type prefixes for command info
Properties:
Name Type Description numberString userString channelString -
action : CommandAction
-
The command action
-
desc : String
-
The command description
-
info : String
-
Get the info of this command
Example
'**name**|**alias** **<mandatory arg> (optional arg) (#number arg)** - *description*' -
name : String
-
The command name
-
options : Object
-
The options for the command
Properties:
Name Type Description argsArray<Argument> The arguments for the command
aliasesArray<String> Other names that trigger the command
guideObject Guide info displayed when a command guide is built with the agent
Properties
Name Type Description colorNumber An integer color for the sidebar of the command guide
fieldsArray<Object> A list of field objects displayed in the guide
restrictedBoolean Whether or not this command is restricted to admin only
guildOnlyBoolean Whether or not this command can only be triggered in guilds as opposed to DMs
authLevelNumber The minimum auth level required to execute this command