Closed KasaiKonoru closed 6 months ago
Did you provide voice intents
Do you properly listen to the raw event?
Try the advanceOptions for debugoptions noAudio
Yeah Its listen to the raw event. And voice intents are enabled
you mean Guild_Voice_States intent, right?
And how you mean "Try the advanceOptions for debugoptions noAudio" I don't understand how.
Ahhh nvm it works now. My bad.
But now I tried custom url mp3's but I get the error: "Not a valid URL." Where I can enable custom url plays?
http urls needs to be enabled in application.yml from lavalink...
As you can see in the example bot: https://github.com/Tomato6966/lavalink-client/blob/main/testBot/index.ts
you can add the advancedOptions.debugOptions.noAudio = true
client.lavalink = new LavalinkManager({
// ...
advancedOptions: {
debugOptions: {
noAudio: true
}
}
})
Thx for your response...
http urls needs to be enabled in application.yml from lavalink...
yeah I enabled "local" and "http" (I set them to true)
application.txt This are my settings. (I changed it to txt because github dont want yaml files)
I noticed that in your Lavalink log, there is no voice information You added the sendRawData() function? https://github.com/Tomato6966/lavalink-client/blob/main/testBot/events/raw.ts
all is working, but only http requests not.
And I have a question: How I can search for track without an active player? I want to search first and then create the player, whenj something is found.
Nvm http is working. A lavalink dev said me: "spaces need to be properly encoded in urls". Now it works. But how I can search for tracks without an active player?
Ahh you mean something like that?
client.manager.nodeManager.nodes.get("main").search()
Yes, I hadn't seen that one either :)
lol xD But whats the best method?
The best method is to search by creating a player. That way you don't have to mind for "checking if the song searched on node X is the same as the node of the player created later"
The player creation is almost instant, so no reason not to create a player.
const player = client.manager.createPlayer({ guildId: "" });
const res = await player.search({ query, source }, requesterUser);
You can create player without providing the voiceChannelId too... if you want him to connect later without re-creating it, simply do:
player.options.voiceChannelId = "vcId";
await player.connect();
Okay thanks
I have also no errors in console. But Position is changing all the time. :c
Lavalink Logs: