Lavacord
    Preparing search index...

    Class RestSealed

    A utility class for interacting with the Lavalink REST API.

    Provides methods to perform various operations on a Lavalink server through its REST API, including loading tracks, decoding tracks, and controlling players.

    Index

    Constructors

    Methods

    • Decodes track(s) from their base64 encoded form.

      Parameters

      • node: LavalinkNode

        The Lavalink node to use.

      • track: string

        A single track to decode.

      Returns Promise<Track>

      A promise resolving to the decoded track information.

      RestError If Lavalink encounters an error.

    • Decodes multiple tracks from their base64 encoded form.

      Parameters

      • node: LavalinkNode

        The Lavalink node to use.

      • tracks: string[]

        An array of tracks to decode.

      Returns Promise<DecodeTracksResult>

      A promise resolving to an array of decoded track information.

      RestError If Lavalink encounters an error.

    • Destroys a player on a Lavalink node.

      Parameters

      • node: LavalinkNode

        The Lavalink node hosting the player.

      • guildId: string

        The guild ID associated with the player to destroy.

      Returns Promise<void>

      A promise resolving to the destroy player result.

      RestError If Lavalink encounters an error.

    • Updates a player on a Lavalink node.

      Parameters

      • node: LavalinkNode

        The Lavalink node hosting the player.

      • guildId: string

        The guild ID associated with the player.

      • data: UpdatePlayerData

        The player update data.

      • noReplace: boolean = false

        If true, the event will be dropped if there's a currently playing track.

      Returns Promise<Player>

      A promise resolving to the updated player information.

      RestError If Lavalink encounters an error.

    • Retrieves the version from the Lavalink server.

      Parameters

      Returns Promise<string>

      A promise resolving to the version of lavalink.

      RestError If Lavalink encounters an error.