async search(query) {
    const socket = this.ideal[0];
    if (!socket) throw new Error("Manager#create(): No available sockets.");
    const resp = await fetch(
      `http${
        socket.secure ? "s" : ""
      }://${socket.address}/loadtracks?identifier=${
        encodeURIComponent(query ?? "")
      }`,
      {
        headers: {
          Authorization: socket.password ?? "youshallnotpass",
        },
        method: "GET",
      },
    );
    const data = await resp.json();
    return data;
  }
/**
   * Search lavalink for songs.
   * @param query The search query.
   */
Search lavalink for songs.
@param query The search query.
Search lavalink for songs . @param query The search query .
async search(query) {
    const socket = this.ideal[0];
    if (!socket) throw new Error("Manager#create(): No available sockets.");
    const resp = await fetch(
      `http${
        socket.secure ? "s" : ""
      }://${socket.address}/loadtracks?identifier=${
        encodeURIComponent(query ?? "")
      }`,
      {
        headers: {
          Authorization: socket.password ?? "youshallnotpass",
        },
        method: "GET",
      },
    );
    const data = await resp.json();
    return data;
  }
async search ( query ) { const socket = this . ideal [ 0 ] ; if ( ! socket ) throw new Error ( "Manager#create(): No available sockets." ) ; const resp = await fetch ( ` ${ socket . secure ? "s" : "" } ${ socket . address } ${ encodeURIComponent ( query ?? "" ) } ` , { headers : { Authorization : socket . password ?? "youshallnotpass" , } , method : "GET" , } , ) ; const data = await resp . json ( ) ; return data ; }
Search lavalink for songs.
Search lavalink for songs .