Home Reference Source

Typedef

Static Public Summary
public

The configuration object returned by command configurators.

public
public

One of the types that a command parameter is allowed to take.

public

One of the types that a prefix filter can be generated from.

public

The type of method to use when sending audio responses.

Static Public

public CommandConfiguration: Object source

The configuration object returned by command configurators.

Properties:

NameTypeAttributeDescription
handler Function

The command handler.

triggers string[]

The command triggers. The first element is treated as the command name. Any other elements are treated as optional aliases.

parameters string | ParameterDefinition

The command parameters.

group string

The command's group name.

description string

The command description.

dependencies string[] | Object

Service dependencies to inject into the handler's context.

middleware middlewareLayer[]

The command middleware.

public ParameterDefinition: Object source

Properties:

NameTypeAttributeDescription
name string

The name of the parameter.

description string

The description of the parameter.

optional boolean

Whether or not the parameter is optional.

type string

The type of the parameter.

repeatable boolean

Whether or not the parameter accepts an array of values instead of an atomic value.

literal boolean

Whether or not this parameter gets the value of the entire input string.

defaultValue *

The default value of the parameter, or an array of default values if the parameter is repeatable.

public ParameterType: boolean | number | string source

One of the types that a command parameter is allowed to take.

public PrefixType: string | RegExp | function source

One of the types that a prefix filter can be generated from.

public VoiceInputMethod: string source

The type of method to use when sending audio responses. Must be one of:

  • arbitraryInput
  • broadcast
  • convertedStream
  • file
  • opusStream
  • stream