Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IVoiceConnection

Hierarchy

  • IVoiceConnection

Index

Methods

disconnect

  • disconnect(): void

end

  • end(): void

getAvailableEvents

  • getAvailableEvents(): string[]
  • Gets all available events for the voice connection

    Returns string[]

    The available events as array of strings

getVoiceChannel

isSpeaking

  • isSpeaking(): boolean
  • Checks whether the client is currently speaking

    Returns boolean

    true if the client is speaking, else false

onEvent

  • onEvent(name: string, listener: function): void
  • Handles the voice connection events

    Parameters

    • name: string

      The name of the event

    • listener: function

      The listener function that gets attached to the event

        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

pause

  • pause(silence?: boolean): void
  • Pauses the current audio stream

    Parameters

    • Optional silence: boolean

      Whether to play silence while paused to prevent audio glitches

    Returns void

play

  • play(resource: string): void
  • Play the given resource

    Parameters

    • resource: string

      The streaming resource, e.g. a link

    Returns void

removeAllListeners

  • removeAllListeners(name: string): void
  • Removes all event listeners of the given event

    Parameters

    • name: string

      The name of the event

    Returns void

resume

  • resume(): void

Generated using TypeDoc