Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Command

Class representing a command.

Hierarchy

  • Command

Index

Constructors

constructor

Properties

Optional filename

filename: string

The name of the file the command was loaded from, if any.

names

names: string[]

A list of the command's names. The first should be considered the command's canonical or display name. All characters must be lowercase if the client option caseSensitiveCommands is false or unset.

process

The function executed when the command is triggered.

requirements

requirements: CommandRequirements

The requirements for the command being triggered.

subcommands

subcommands: Command[] = []

Subcommands of this command.

Methods

addSubcommand

checkPermissions

execute

subcommandForName

  • subcommandForName(name: string, caseSensitive: boolean): null | Command
  • Checks the list of subcommands and returns one whch is known by a given name. Passing an empty string will return the default command, if any.

    Parameters

    • name: string
    • caseSensitive: boolean

    Returns null | Command

Generated using TypeDoc