Constructor
new BotCommand(name, options, func)
Creates a new command.
You must register it with Core.commands.register(command) to make it work.
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name |
string | Command name. MUST be in lowercase and contain no spaces | |||||||||||||||||||||||||||||||||
options |
object | Command options
Properties
|
|||||||||||||||||||||||||||||||||
func |
function | Command handler |
- Source:
Members
name
Command name
- Source:
Methods
(async) exec(msg, args)
Calls the command handler.
Parameters:
Name | Type | Description |
---|---|---|
msg |
Discord.Message | Message object |
args |
string | Array.<string> | Arguments |
- Source: