Constructor
# new Manager()
Properties:
Name | Type | Description |
---|---|---|
token |
Object | The bot's token. |
options |
Object | The options for the command manager. |
Extends
Members
Object
# utils
The utils functions used by the command manager.
Properties:
Name | Type | Description |
---|---|---|
separateCommand |
function | Checks the command and separate the commands and groups of commands. |
- Overrides:
Methods
# async deleteCommand(commandID, guildopt) → {Promise.<Object>}
Delete a application command.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
commandID |
String | The ID of the command to delete. | |
guild |
String |
<optional> |
The guild id to delete the command, if is undefined will delete global command. |
The deleted command object.
Promise.<Object>
# async editCommand(commandID, command, guildopt) → {Promise.<Object>}
Edit a application command.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
commandID |
String | The ID of the command to edit. | |
command |
Object | The new command object. | |
guild |
String |
<optional> |
the guild id to edit the command, if is undefined will edit global command. |
The new command object.
Promise.<Object>
# async getCommands(guildopt) → {Promise.<Object>}
Get application commands.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
guild |
String |
<optional> |
Guild id to get commands, if is undefined will get global commands. |
- Overrides:
Promise.<Object>
# async registerCommand(command, guildopt) → {Promise.<Object>}
Register a new application command.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
command |
Object | The command object. | |
guild |
String |
<optional> |
The guild id to register the command, if is undefined will register global command. |
The new command object.
Promise.<Object>
# async searchCommand(commandName, guildopt) → {Promise.<Array>}
Search for a application command.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
commandName |
String | The name of the command to search. | |
guild |
String |
<optional> |
The guild id to search the command, if is undefined will search global command. |
The commands matching the name.
Promise.<Array>
# async start() → {Boolean}
Start the command manager.
- Overrides:
Returns true if the manager was started, otherwise returns an error.
Boolean
# stop() → {Boolean}
Stop the command manager.
- Overrides:
Returns true to indicate that the manager is stopped.
Boolean