Command

Command

Command extends Handler to provide a simple way of creating Command Handlers.

Constructor

new Command(object, callable, manualopt, requiresopt)

For simple commands, use one of the reduced syntaxes. If you need additional properties like options or replaceable, use an object (that usually also includes the callback property)

1. (object) - Object constructor

2. (callable, [manual], [requires]) - Named function constructor

3. (name, callable, [manual], [requires]) - Function constructor

Parameters:
Name Type Attributes Description
object object | function | string

Object, Command's Callable function with name, or Command name

Properties
Name Type Attributes Description
name string

Command

callable Callable~callable

Command's callable function

manual Manual <optional>

Command's Manual

requires Array.<Requirement> <optional>

Requirements

callable Array.<Requirement> | function

Array of Requirements or Callable

manual Manual <optional>

Command's Manual

requires Array.<Requirement> <optional>

Array of Requirements

Source:
See: