add

open fun add(command: ChatCommand<out Arguments>)

Directly register a ChatCommand to this command registry.

Generally speaking, you shouldn't call this directly - instead, create an Extension and call the ChatGroupCommand.chatCommand function in your Extension.setup function.

This function will throw a CommandRegistrationException if the command has already been registered, if a command with the same name exists, or if a command with one of the same aliases exists.

Parameters

command

The command to be registered.

Throws

Thrown if the command could not be registered.