Class Queue<T>

Type Parameters

Constructors

Properties

guildId: string
node: Node

Accessors

Methods

  • Adds tracks to the end of the queue.

    Parameters

    • Rest...track: T[]

      The tracks to be added.

    Returns void

  • Adds tracks to the beginning of the queue.

    Parameters

    • Rest...track: T[]

      The tracks to be added.

    Returns void

  • Changes the position of a track in the queue.

    Parameters

    • oldIndex: number

      The current index of the track.

    • newIndex: number

      The new index for the track.

    Returns void

    Will throw an error if the indices are out of bounds.

  • Plays the next track in the queue.

    Returns null | T

    The next track that was played or null if the queue is empty.

  • Removes tracks from the queue by their indices.

    Parameters

    • Rest...indices: number[]

      The indices of the tracks to be removed.

    Returns void

  • Sets the volume for playback.

    Parameters

    • volume: number

      The volume level to be set.

    Returns void