@discordx/music
    Preparing search index...

    Class Queue<T>

    Type Parameters

    Index

    Constructors

    Properties

    guildId: string
    node: Node

    Accessors

    Methods

    • Adds tracks to the end of the queue.

      Parameters

      • ...track: T[]

        The tracks to be added.

      Returns void

    • Adds tracks to the beginning of the queue.

      Parameters

      • ...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

      • ...indices: number[]

        The indices of the tracks to be removed.

      Returns void

    • Seek the playback to specific position

      Parameters

      • seconds: number

        in milliseconds

      Returns null | T

    • Sets the volume for playback.

      Parameters

      • volume: number

        The volume level to be set.

      Returns void