Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TeamSpeakQuery

Hierarchy

  • EventEmitter
    • TeamSpeakQuery

Index

Type aliases

Static Response

Response: ResponseEntry[]

Static ValueTypes

ValueTypes: boolean | string | string[] | number | number[] | undefined | Response

Static executeArgs

Constructors

constructor

Properties

Private active

active: QueueItem | undefined

Private config

Private connected

connected: boolean = false

Readonly doubleEvents

doubleEvents: string[] = ["notifyclientleftview","notifyclientmoved","notifycliententerview"]

Private floodTimeout

floodTimeout: Timeout

Private ignoreLines

ignoreLines: number = TeamSpeakQuery.IGNORE_LINES_INITIAL

Private keepAliveTimeout

keepAliveTimeout: any

Private lastEvent

lastEvent: string = ""

Private lastcmd

lastcmd: number = Date.now()

Private pauseQueue

pauseQueue: boolean = true

Private queue

queue: QueueItem[] = []

Private socket

Static IGNORE_LINES_INITIAL

IGNORE_LINES_INITIAL: number = 2

Static defaultMaxListeners

defaultMaxListeners: number

Static Readonly errorMonitor

errorMonitor: keyof symbol

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted, therefore the process will still crash if no regular 'error' listener is installed.

Methods

addListener

  • addListener(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

connect

  • connect(): void

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): Array<string | symbol>
  • Returns Array<string | symbol>

execute

executePrio

forceQuit

  • forceQuit(): void

getMaxListeners

  • getMaxListeners(): number

Private getNextQueueItem

Private handleClose

  • handleClose(): void

Private handleCommand

Private handleConnect

  • handleConnect(): void

Private handleError

  • handleError(error: Error): void

Private handleFloodingError

  • handleFloodingError(active: QueueItem): void

Private handleLine

  • handleLine(line: string): void

Private handleQueryError

  • handleQueryError(line: string): void

Private handleQueryEvent

  • handleQueryEvent(line: string): void
  • Handles an event which has been received from the TeamSpeak Server

    Parameters

    • line: string

      event response line from the teamspeak server

    Returns void

isConnected

  • isConnected(): boolean

Private keepAlive

  • keepAlive(): void

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

off

  • off(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

on

  • on(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

once

  • once(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

pause

  • pause(pause: boolean): this

prependListener

  • prependListener(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

Private queueWorker

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Parameters

    • Optional event: string | symbol

    Returns this

removeListener

  • removeListener(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

Private send

  • send(data: string): void

Private sendKeepAlive

  • sendKeepAlive(): void

setMaxListeners

  • setMaxListeners(n: number): this

Static getSocket

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • deprecated

    since v4.0.0

    Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Generated using TypeDoc