Options
All
  • Public
  • Public/Protected
  • All
Menu

Class VoiceDataStream

Hierarchy

  • EventEmitter
    • VoiceDataStream

Index

Constructors

constructor

  • Parameters

    • type: string

    Returns VoiceDataStream

Properties

type

type: "opus" | "pcm"

Static defaultMaxListeners

defaultMaxListeners: number

Methods

addListener

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

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

          • Rest ...args: any[]

          Returns void

    Returns VoiceDataStream

emit

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

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

    Returns boolean

eventNames

  • eventNames(): (string | symbol)[]
  • Returns (string | symbol)[]

getMaxListeners

  • getMaxListeners(): number
  • Returns number

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): VoiceDataStream
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns VoiceDataStream

on

  • on(event: "data", listener: (data: Buffer, userID: string, timestamp: number, sequence: number) => void): VoiceDataStream
  • Parameters

    • event: "data"
    • listener: (data: Buffer, userID: string, timestamp: number, sequence: number) => void
        • (data: Buffer, userID: string, timestamp: number, sequence: number): void
        • Parameters

          • data: Buffer
          • userID: string
          • timestamp: number
          • sequence: number

          Returns void

    Returns VoiceDataStream

once

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

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

          • Rest ...args: any[]

          Returns void

    Returns VoiceDataStream

prependListener

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

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

          • Rest ...args: any[]

          Returns void

    Returns VoiceDataStream

prependOnceListener

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

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

          • Rest ...args: any[]

          Returns void

    Returns VoiceDataStream

rawListeners

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

    • event: string | symbol

    Returns Function[]

removeAllListeners

  • Parameters

    • Optional event: string | symbol

    Returns VoiceDataStream

removeListener

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

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

          • Rest ...args: any[]

          Returns void

    Returns VoiceDataStream

setMaxListeners

  • Parameters

    • n: number

    Returns VoiceDataStream

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