Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CommandGroup

Hierarchy

Index

Constructors

constructor

Properties

Protected commander

commander: Commander

Private commands

commands: Array<Command> = []

Protected permissionHandler

permissionHandler: permissionHandler[] = []

Protected runHandler

runHandler: runHandler[] = []

Methods

addCommand

  • addCommand(name: string): Command

addThrottle

checkPermission

clearManual

  • clearManual(): this

disable

  • disable(): this

Protected dispatchCommand

enable

  • enable(): this

findSubCommandByName

  • findSubCommandByName(name: string): Command

getAvailableSubCommands

  • getAvailableSubCommands(client?: TeamSpeakClient, cmd?: undefined | string): Promise<BaseCommand[]>
  • retrievel all available subcommands

    Parameters

    • Optional client: TeamSpeakClient

      the sinusbot client for which the commands should be retrieved if none has been omitted it will retrieve all available commands

    • Optional cmd: undefined | string

      the command which should be searched for

    Returns Promise<BaseCommand[]>

getCommandName

  • getCommandName(): string | function

getFullCommandName

  • getFullCommandName(): string

getHelp

  • getHelp(client: TeamSpeakClient): string

getManual

  • getManual(client: TeamSpeakClient): string

getPrefix

  • getPrefix(): string

getUsage

  • getUsage(): string

handleRequest

hasHelp

  • hasHelp(): boolean

hasManual

  • hasManual(): boolean

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

validate

  • validate(): object

Generated using TypeDoc