CommandRegistry
Extends:
Handles registration and searching of commands and modules
Constructor Summary
Public Constructor | ||
public |
constructor(logger: Logger) |
Member Summary
Public Members | ||
public |
|
|
public |
|
|
public |
|
Method Summary
Public Methods | ||
public |
findCommands(searchString: string, message: Message): Command[] Finds all commands that match the search string |
|
public |
findModules(searchString: string): Module[] Finds all modules that match the search string |
|
public |
registerCommand(command: Command) Registers a single command |
|
public |
registerCommands(commands: Command[]) Registers multiple commands |
|
public |
registerModule(module: Module) Registers a single module |
|
public |
registerModules(modules: Module[]) Registers multiple modules |
Public Constructors
Public Members
Public Methods
public findCommands(searchString: string, message: Message): Command[] source
Finds all commands that match the search string
public findModules(searchString: string): Module[] source
Finds all modules that match the search string
Params:
Name | Type | Attribute | Description |
searchString | string |
|
The string to search for |
public registerCommand(command: Command) source
Registers a single command
Params:
Name | Type | Attribute | Description |
command | Command | The command to register |
public registerCommands(commands: Command[]) source
Registers multiple commands
Params:
Name | Type | Attribute | Description |
commands | Command[] | The commands to register |
Emit:
* |
commandRegister When a command is registered, with the command and registry passed |