The client that this command registry will be used by.
Readonly clientThe client that this command registry will be used by.
CommandRegistry
Readonly commandsA collection of the commands registered to this registry, mapped by the command's name and the command.
CommandRegistry
Readonly groupsA collection of the groups registered to this registry, mapped by the group's ID and the group.
CommandRegistry
Returns an array with all the slash commands registered.
The array of slash commands.
Register a command to this registry.
The command to register.
This command registry.
Throws if the command's groupID is not registered.
Throws if the command's name is already registered.
Throws if the command's name is also specified as its own alias.
Throws if any of the command's aliases is already registered.
client#commandRegistered
Register multiple commands to this register.
An array of commands to register.
This command registry.
Throws if any of the command's groupID is not registered.
Throws if any of the command's name is already registered.
Throws if any of the command's name is also specified as its own alias.
Throws if any of the command's aliases is already registered.
client#commandRegistered
Register all commands in a directory. Commands must be located inside subdirectories with the groupID as name.
Groups must be registered beforehand, otherwise this method will not pick them up.
The resolved path to the directory containing all commands.
This command registry.
Throws if any of the command's groupID is not registered.
This may happen if a command with an unregistered group is located inside a registered group subdirectory.
Throws if any of the command's name is already registered.
Throws if any the command's name is also specified as its own alias.
Throws if any of the command's aliases is already registered.
client#commandRegistered
Register the default commands. Default groups should be registered before using this. For more information, check out DefaultCommands.
If true it will register the default slash commands otherwise, the regular ones will be registered.
This command registry.
client#commandRegistered
Register the default groups. The default groups are:
| ID of the group | Name of the group |
|---|---|
misc |
Miscellaneous Commands |
config |
Configuration Commands |
This command registry.
client#groupRegistered
Register both the default groups and default slash commands in the correct order.
This command registry.
client#groupRegistered
client#commandRegistered
Register a command group.
The ID of the group.
The name of the group.
This command registry.
Throws if the groupID is already registered.
client#groupRegistered
Register multiple command groups.
An array of arrays of strings. The inner arrays must have the shape: [groupID, groupName].
This command registry.
Throws if any groupID is already registered.
client#groupRegistered
Resolves the command from this registry corresponding to its name or alias.
The name or alias of the command.
The resolved command, or undefined if no command is resolved.
Generated using TypeDoc
A command registry. This keeps track of all the commands and command groups registered in the client.