using direct link gives no results but searching does.
I haven't used this library at all but I've used some that are similar to it in the past (erela.js, vulkava, etc...). I picked it because it was the most familiar feeling but I'm running into an issue with direct links in my first implementation. Here is the code I use to play tracks and attached to this post is the logs from the console
edit: forgot to mention that the value of
query
is interaction.options.getString("query")
I have also tried different links
Solution:Jump to solution
I didn't read the lavalink logs properly and it ended up being that they depricated their out-of-the-box youtube support so I had to install a plugin. Thank you so much for your help regardless ❤️
2 Replies
const player = client.moonlink.createPlayer({
guildId: interaction.guild.id,
voiceChannelId: voiceChannel.id,
textChannelId: interaction.channel.id,
});
let res = await client.moonlink
.search({
query,
source: "youtube",
requester: interaction.user.id,
})
switch (res.loadType) {
case "track":
player.queue.add(res.tracks[0]);
if (!player.playing) player.play();
interaction.reply(
Enqueued [${res.tracks[0].info.title}](${res.tracks[0].info.uri})
);
break;
}
trySolution
I didn't read the lavalink logs properly and it ended up being that they depricated their out-of-the-box youtube support so I had to install a plugin. Thank you so much for your help regardless ❤️