Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BaseCommand

Hierarchy

Index

Constructors

constructor

Properties

Private cmdEnabled

cmdEnabled: boolean = true

Private cmdHelp

cmdHelp: TranslationString = ""

Private cmdManual

cmdManual: TranslationString[] = []

Private cmdName

Private cmdPrefix

cmdPrefix: string = ""

Private cmdThrottle

cmdThrottle: Throttle

Protected commander

commander: Commander

Protected permissionHandler

permissionHandler: permissionHandler[] = []

Protected runHandler

runHandler: runHandler[] = []

Methods

addThrottle

checkPermission

clearManual

  • clearManual(): this

disable

  • disable(): this

Protected dispatchCommand

enable

  • enable(): this

getCommandName

  • getCommandName(): string | function

getFullCommandName

  • getFullCommandName(): string

getHelp

  • getHelp(client: TeamSpeakClient): string

getManual

  • getManual(client: TeamSpeakClient): string

getPrefix

  • getPrefix(): string

Abstract getUsage

  • getUsage(): string

Abstract handleRequest

Private handleThrottle

  • handleThrottle(client: TeamSpeakClient): void

hasHelp

  • hasHelp(): boolean

hasManual

  • hasManual(): boolean

Abstract hasPermission

  • hasPermission(client: TeamSpeakClient): Promise<boolean>

help

isEnabled

  • isEnabled(): boolean

manual

Protected permCheck

  • permCheck(client: TeamSpeakClient): Promise<boolean>

prefix

  • prefix(prefix: string): this
  • sets a prefix for this command should only used in specific cases by default the prefix gets inherited from its Commander

    Parameters

    • prefix: string

      the new prefix for this command

    Returns this

run

Abstract validate

  • validate(args: string): Record<string, any>

Generated using TypeDoc