Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SharedStream

Hierarchy

  • EventEmitter
    • SharedStream

Index

Constructors

constructor

  • new SharedStream(options?: EventEmitterOptions): SharedStream
  • Parameters

    • Optional options: EventEmitterOptions

    Returns SharedStream

Properties

Optional current

current: undefined | { options: VoiceResourceOptions; pausedTime?: undefined | number; pausedTimestamp?: undefined | number; playTime: number; startTime: number }

ended

ended: boolean

playing

playing: boolean

speaking

speaking: boolean

volume

volume: number

Static defaultMaxListeners

defaultMaxListeners: number

Methods

add

  • Parameters

    Returns void

addListener

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

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

          • Rest ...args: any[]

          Returns void

    Returns SharedStream

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

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

          • Rest ...args: any[]

          Returns void

    Returns SharedStream

on

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

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

          • Rest ...args: any[]

          Returns void

    Returns SharedStream

once

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

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

          • Rest ...args: any[]

          Returns void

    Returns SharedStream

play

  • Parameters

    Returns void

prependListener

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

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

          • Rest ...args: any[]

          Returns void

    Returns SharedStream

prependOnceListener

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

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

          • Rest ...args: any[]

          Returns void

    Returns SharedStream

rawListeners

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

    • event: string | symbol

    Returns Function[]

remove

  • Parameters

    Returns void

removeAllListeners

  • Parameters

    • Optional event: string | symbol

    Returns SharedStream

removeListener

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

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

          • Rest ...args: any[]

          Returns void

    Returns SharedStream

setMaxListeners

  • Parameters

    • n: number

    Returns SharedStream

setVolume

  • setVolume(volume: number): void
  • Parameters

    • volume: number

    Returns void

stopPlaying

  • stopPlaying(): void
  • Returns void

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