Create a voice connection to the voice channel

Hierarchy

Constructors

Properties

#channel: VoiceBasedChannel
#volume: number = 100
audioPlayer: AudioPlayer
audioResource?: AudioResource<unknown>
connection: VoiceConnection
emittedError: boolean
id: string
isDisconnected: boolean = false
stream?: DisTubeStream
defaultMaxListeners: number

Accessors

  • get voiceState(): undefined | VoiceState
  • The voice state of this connection

    Returns undefined | VoiceState

Methods

  • Type Parameters

    Parameters

    Returns this

  • Type Parameters

    Parameters

    Returns boolean

  • Type Parameters

    Returns U[]

  • Returns number

  • Leave the voice channel of this connection

    Parameters

    • Optional error: Error

      Optional, an error to emit with 'error' event.

    Returns void

  • Parameters

    Returns number

  • Type Parameters

    Parameters

    Returns this

  • Type Parameters

    Parameters

    Returns this

  • Type Parameters

    Parameters

    Returns this

  • Type Parameters

    Parameters

    Returns this

  • Type Parameters

    Parameters

    Returns this

  • Parameters

    • Optional event: keyof DisTubeVoiceEvents

    Returns this

  • Type Parameters

    Parameters

    Returns this

  • Parameters

    • n: number

    Returns this

  • Self-deafens/undeafens the bot.

    Parameters

    • selfDeaf: boolean

      Whether or not the bot should be self-deafened

    Returns boolean

    true if the voice state was successfully updated, otherwise false

  • Self-mutes/unmutes the bot.

    Parameters

    • selfMute: boolean

      Whether or not the bot should be self-muted

    Returns boolean

    true if the voice state was successfully updated, otherwise false