Members
plain
Registered commands including aliases
- Source:
registered
Registered commands
- Source:
Methods
getPrefix() → {Promise.<string>}
Gets the current prefix.
- Source:
Returns:
- Type
- Promise.<string>
processMessage()
Processes a message.
- Source:
register(name, options, func) → {BotCommand|Array.<BotCommand>}
Registers command(s).
First parameter can be either a name, or a {BotCommand} instance or array.
Second parameter can be an object containg settings, or the handler function.
Third parameter is the handler function when settings are the second.
If a command with the same name exists, it will be overwritten.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Name of the command |
options |
object | Command options |
func |
function | Function to execute |
- Source:
- See:
Returns:
The registered command instance(s).
- Type
- BotCommand | Array.<BotCommand>
run(name, msg, args)
Executes a command.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Name of the command |
msg |
object | Discordie IMessage |
args |
string | Array.<string> | Arguments |
- Source:
unregister(c)
Unregisters command(s)
First parameter can be either a name, a {BotCommand} instance or an array of both.
Parameters:
Name | Type | Description |
---|---|---|
c |
string | BotCommand | Array | Command(s) to unregister. |
- Source: