Shoukaku
    Preparing search index...

    Class Rest

    Wrapper around Lavalink REST API

    Index

    Constructors

    • Parameters

      • node: Node

        An instance of Node

      • options: NodeOption

        The options to initialize this rest class

        • auth: string

          Credentials to access Lavalink

        • Optionalgroup?: string

          Name of the Lavalink node group

        • name: string

          Name of the Lavalink node

        • Optionalsecure?: boolean

          Whether to use secure protocols or not

        • url: string

          Lavalink node host and port without any prefix

      Returns Rest

    Properties

    auth: string

    Credentials to access Lavalink

    node: Node

    Node that initialized this instance

    url: string

    URL of Lavalink

    Accessors

    Methods

    • Decode a track

      Parameters

      • track: string

        Encoded track

      Returns Promise<Track>

      Promise that resolves to a track

    • Deletes a Lavalink player

      Parameters

      • guildId: string

        guildId where this player is

      Returns Promise<void>

    • Internal

      Make a request to Lavalink

      Type Parameters

      • T = unknown

      Parameters

      • fetchOptions: FetchOptions
        • endpoint

          Lavalink endpoint

        • options

          Options passed to fetch

      Returns Promise<undefined | T>

      RestError when encountering a Lavalink error response

    • Gets the status of this node

      Returns Promise<Stats>

      Promise that resolves to a node stats response

    • Release blacklisted IP address into pool of IPs

      Parameters

      • address: string

        IP address

      Returns Promise<void>

    • Updates a Lavalink player

      Parameters

      • guildId: string

        GuildId of the player you want to update

      • updatePlayerOptions: UpdatePlayerOptions

        Data to update on the player

      • noReplace: boolean = false

        If you want this action to do nothing when the player is active

      Returns Promise<LavalinkPlayer>

      Promise that resolves to a Lavalink player

    • Updates the session with a resume boolean and timeout

      Parameters

      • Optionalresuming: boolean

        Whether resuming is enabled for this session or not

      • Optionaltimeout: number

        Timeout to wait for resuming

      Returns Promise<SessionInfo>

      Promise that resolves to a Lavalink player