# Command Handler

# Constructor

  new Biscord.CommandHandler( directory , CommandSettings )
1
PARAMETER TYPE OPTIONAL DESCRIPTION
directory String (opens new window) The directory to your commands.
CommandOptions JSON (opens new window) The settings on how the CommandHandler will behave.

# Properties

# commands

Get Client commands.

Type: Collection (opens new window)

# slashcommands

Get Client application commands, Methods from Client#application#commands and Client#application#commands#cache methods have been merged.

Type: ApplicationCommandManager (opens new window) , Collection (opens new window)

# Methods

# register( SlashRegistryOptions )

Registers Slash Commands to all the server that the Client is currenlty in.

PARAMETER TYPE OPTIONAL DESCRIPTION
SlashRegistryOptions JSON (opens new window) The options on how Biscord will register the commands.

Returns: Promise (opens new window) < Boolean (opens new window) >

# destroy( )

Destroy this instance.

Returns: None

# Events

# error

Emits when the CommandHandler encounters an error.

PARAMETER TYPE DESCRIPTION
Error String (opens new window) The error that the handler encountered.

# cooldown

Emits when a member is on command cooldown.

PARAMETER TYPE DESCRIPTION
Message Message (opens new window) The message that was submitted.
Command CommandResolvable The command that the member attempted to execute.
Arguments Array (opens new window) The arguments of the command.
Remaining Number (opens new window) The remaining time before this command can be executed by this member.

# commandError

Emits when an error was encountered during an execution of a command.

PARAMETER TYPE DESCRIPTION
CommandCode String (opens new window) The cause why the member failed to executed the command for this member.
Message Message (opens new window) The message where this command was attempted to be executed.
Arguments Array (opens new window) The arguments of the message.
Command String (opens new window) / JSON (opens new window) If the command was found it will be a JSON, but if command is non existent it will be the name of the command the member attempted to executed instead.

# slashRegistered

Emits when the SlashCommands are registered to the listed servers that the Bot is currenlty in.

PARAMETER TYPE DESCRIPTION
SlashCommands Array (opens new window) The slash commands that was registered.
Guilds Array (opens new window) The servers these slash commands was registered to.

# slashFailed

Emits when an error was encountered during an execution of a slash command.

PARAMETER TYPE DESCRIPTION
Error String (opens new window) The error that the handler encountered.
Interaction Interaction (opens new window) The interaction that was used to execute this slash command.