Discolink
    Preparing search index...

    Class Queue<Context>

    A class representing the Queue of a guild's player

    Type Parameters

    Index

    Constructors

    Properties

    context: Context = ...

    Additional data specific to this queue

    voice: VoiceState

    Voice state representing connection status

    filters: FilterManager

    Manager responsible for handling filters

    Accessors

    • get stopped(): boolean

      Whether the player is stopped. i.e. the queue has a track but the player doesn't

      Returns boolean

    • get finished(): boolean

      Whether the queue has no current tracks

      Returns boolean

    • get destroyed(): boolean

      Whether this instance of Queue is destroyed

      Returns boolean

    • get isEmpty(): boolean

      Whether this queue is empty (zero previous and current tracks)

      Returns boolean

    • get hasPrevious(): boolean

      Whether the queue has a previous track

      Returns boolean

    • get totalLength(): number

      Total tracks in queue (current + previous)

      Returns number

    • get duration(): number

      Total duration of current tracks in queue in milliseconds

      Returns number

    • get formattedDuration(): string

      Formatted total duration of current tracks in queue

      Returns string

    • get currentTime(): number

      Position (time) in milliseconds of the current playing track

      Returns number

    • get formattedCurrentTime(): string

      Formatted position (time) of the current playing track

      Returns string

    Methods

    • Seeks to a position in current playing track

      Parameters

      • ms: number

        Position (time) in milliseconds to seek to

      Returns Promise<number>

    • Enables or disables autoplay

      Parameters

      • autoplay: boolean = false

        Whether to enable autoplay. Default: false

      Returns boolean

    • Destroys this instance of Queue, removing it from its manager

      Parameters

      • Optionalreason: string

        Reason for destroying

      Returns Promise<void>