Discolink
    Preparing search index...

    Class Queue<Context>

    Class representing a guild's queue, wrapping over its lavalink player.

    User interpretation: join of two arrays; negative for previous, zero for current, positive for next

    Type Parameters

    Index
    context: Context = ...

    Context of this queue

    voice: VoiceState
    filters: FilterManager
    player: Player
    • get volume(): number

      Volume of the lavalink player

      Returns number

    • get paused(): boolean

      Whether the lavalink player is paused

      Returns boolean

    • get stopped(): boolean

      Whether the queue has a track but the lavalink player doesn't

      Returns boolean

    • get empty(): boolean

      Whether the queue has no previous, current, or next tracks

      Returns boolean

    • get playing(): boolean

      Whether the queue has a track and the lavalink player is playing

      Returns boolean

    • get autoplay(): boolean

      Whether autoplay is enabled

      Returns boolean

    • get finished(): boolean

      Whether the queue has no current or next tracks

      Returns boolean

    • get unusable(): boolean

      Whether this queue is (or being) destroyed

      Returns boolean

    • get destroying(): boolean

      Whether this queue is being destroyed

      Returns boolean

    • get destroyed(): boolean

      Whether this queue instance is destroyed

      Returns boolean

    • get hasNext(): boolean

      Whether the queue has a next track

      Returns boolean

    • get hasPrevious(): boolean

      Whether the queue has a previous track

      Returns boolean

    • get length(): number

      Number of current tracks

      Returns number

    • get totalLength(): number

      Number of current and previous tracks

      Returns number

    • get duration(): number

      Duration in milliseconds of current tracks (excluding live tracks)

      Returns number

    • get formattedDuration(): string

      Formatted duration of current tracks (excluding live tracks)

      Returns string

    • get currentTime(): number

      Position in milliseconds of the current track

      Returns number

    • get formattedCurrentTime(): string

      Formatted position of the current track

      Returns string

    • Sync lavalink player

      Parameters

      • target: "local" | "remote" = "local"

        local for queue, remote for node (local by default)

      Returns Promise<void>

    • Remove tracks by group (all if none specified)

      Parameters

      • Optionalgroup: "previous" | "current"

        current for current tracks, previous for previous tracks

      Returns void

      Current track is only removed if its stopped

    • Jump to a specific position in the current track

      Parameters

      • ms: number

        Position in milliseconds

      Returns Promise<number>

    • Shuffle tracks in queue

      Parameters

      • includePrevious: boolean = false

        Whether to move previous tracks to current

      Returns Queue<Context>

    • Set the lavalink player's volume

      Parameters

      • volume: number

        Numeric value between 0 and 1000

      Returns Promise<number>

    • Set autoplay mode

      Parameters

      • autoplay: boolean = false

        Whether to enable autoplay (false by default)

      Returns boolean

    • Destroy this queue instance

      Parameters

      • Optionalreason: string

        Reason for destroying

      Returns Promise<void>