DisTube API Documentation
    Preparing search index...

    Class DisTubeVoice

    Create a voice connection to the voice channel

    Hierarchy

    Index

    Constructors

    Properties

    audioPlayer: AudioPlayer
    connection: VoiceConnection
    emittedError: boolean
    id: string
    isDisconnected: boolean = false
    pausingStream?: DisTubeStream
    stream?: DisTubeStream
    defaultMaxListeners: number

    Accessors

    • get playbackDuration(): number

      Playback duration of the audio resource in seconds (time since playback started)

      Returns number

    • get playbackTime(): number

      Current playback time in seconds, accounting for seek offset

      Returns number

    • get voiceState(): VoiceState | undefined

      The voice state of this connection

      Returns VoiceState | undefined

    Methods

    • Type Parameters

      Returns U[]

    • Returns number

    • Leave the voice channel of this connection

      Parameters

      • Optionalerror: Error

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

      Returns void

    • Parameters

      Returns number

    • Parameters

      • Optionalevent: keyof DisTubeVoiceEvents

      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