commands

This module manages commands and tools of the player

Methods

(static) activateCommand(commandName)

Activate a command, will deactivate the currently active command

Parameters:
Name Type Description
commandName String

The name of the command to be actived

(static) addCommand(command, name) → {Promise}

Add a command

Parameters:
Name Type Description
command Command

Command to be added

name String

provide a name for the tool to allow removing it.

Returns:
Type
Promise

(static) deactivateCommand(commandName)

Deactivate a command

Parameters:
Name Type Description
commandName String

The name of the command to be deactived

(static) removeCommand(name) → {Promise}

Remove a command

Parameters:
Name Type Description
name String

The name of the command to remove

Returns:
Type
Promise

(static) runCommand(commandName, args) → {Promise}

Executes, Activates/Deactivates, or makes Command Active

Parameters:
Name Type Description
commandName String

The name of the command to be run

args Object

An object of keys=params, values=argument

Returns:
Type
Promise

(static) setCommandOptions(name, opts) → {Promise}

Updates Options object of Command

Parameters:
Name Type Description
name String

The name of the command to be updated

opts Object

Options to be set in the command

Returns:
Type
Promise

(static) updateCommand(name, opts) → {Promise}

Updates Atributes of Command

Parameters:
Name Type Description
name String

The name of the command to be updated

opts Object

Attributes to set in the command

Returns:
Type
Promise

(static) updateCommands(commandList) → {Promise}

Updates multiple commands with given Attributes

Parameters:
Name Type Description
commandList String

The name of the command to be run

Returns:
Type
Promise