constUnresolvedTrackQuery= { // you can also do { info: { title, author } } title:"Never gonna give you up", author:"Rick Astley"}constUnresolvedTrack=client.lavalink.utils.buildUnresolvedTrack(UnresolvedTrackQuery,interaction.user);
if(!client.lavalink.utils.isNodeOptions({ host:"localhost", port:999999,// it will say false cause:// authorization is missing + port is invalid}))thrownewError("player.node is not a valid node")
constunresolvedTrack=client.lavalink.utils.buildUnresolved({ title:"Never Gonna Give you up" },interaction.user);constclosest=awaitclient.lavalink.utils.getClosestTrack(unresolvedTrack, player);player.queue.add(closest);// note you can also add unresolved tracks to the queue, the queue will automatically try to resolve it, when it's time to play it.// you can also run await unresolvedTrack.resolve(); to resolve the track
if(!client.lavalink.utils.validateQueryString(player.node,"https://www.youtube.com/watch?v=dQw4w9WgXcQ"))thrownewError("Can't use that link, cause the source of it is disabled on lavalink")