CommandRegistry

Stores loaded Commands in a Collection keyed by each Command's name property

Extends

Properties

.groups: string[]

Contains all Command groups

Type:
string[]
Source:

Methods

.findByNameOrAlias(text: string)Command

Finds a command by name or alias

Parameters:
Name Type Description
text
string

The name or alias of the Command

Source:
Returns:
Command

.registerExternal(client: Client, command: Command) → void

Register an external command and add it to the <Client>.commands collection, erroring on duplicate names and aliases. External commands will be preserved when the reload command is called.

Note: This is intended for Plugins to use to register external commands with the Client instance. Under normal circumstances commands should be added by placing them in the directory passed to the commandsDir YAMDBF Client option

Parameters:
Name Type Description
client
Client

YAMDBF Client instance

command
Command

The Command instance to be registered

Source:
Returns:
void