Class: BotCommand

BotCommand

Represents a bot command.

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
Name Type Description
aliases Array.<string> Command aliases
adminOnly boolean Restrict this command to administrators
djOnly boolean Restrict this command to DJs
ownerOnly boolean Restrict this command to the owner
argSeparator boolean The argument delimiter
includeCommandNameInArgs boolean Useful for aliases
allowDM boolean Allow this command to be executed in DMs
everyone boolean For SelfBots, allow this command to be executed by others.
func function Command handler
Source:

Members

name

Command name
Source:

Methods

exec(msg, args)

Calls the command handler.
Parameters:
Name Type Description
msg object Message object
args string | Array.<string> Arguments
Source: