Closed benniblot closed 2 years ago
It still works in v13.
Check #392
You need to install correctly @discordjs/voice
and get a connection using joinVoiceChannel
Thanks for your help, just fixed the problem in my code.
@LehuyH @Benni0109 I tried to follow that #392 instructions but it's not working for me. Maybe you guys have a clue for what's happening here?
Hey could you quickly explain what works and what doesnt? (e.g. does it join the voice channel, ...)
@Benni0109 right now it joins in the voice channel, send the message reply just fine, but no audio from Bot. I even checked these player events, the player goes to 'Playing' state but right after goes to the 'AutoPause' state and nothing plays on Discord
Could you maybe send me the log from the states? (If you want we could connect via discord so we don't spam this issue) It should look something like this when it works: Audio player transitioned from buffering to playing Audio player transitioned from playing to autopaused Connection transitioned from signalling to connecting Connection transitioned from connecting to connecting Connection transitioned from connecting to connecting Connection transitioned from connecting to connecting Connection transitioned from connecting to ready Audio player transitioned from autopaused to playing [Servername]: Stopped playing Music and left the Voice Channel Connection transitioned from ready to destroyed Audio player transitioned from playing to autopaused
Here is the log. As you can see at the bottom I logged the AudioPlayer statuses and right after the "Playing" state it goes to the "AutoPaused"
Just though about it and you could try to make an var instead of an const for stream.
Try this:
var stream = await ytdl("youtube.com/????", {
highWaterMark: 1 << 25,
filter: 'audioonly',
});
This works for me:
@Benni0109 hey it worked!! Thanks a lot for the help 🙌🏼
No Problem, have fun coding :)
Hey, thank you for creating this wonderful peace of code. I started to use ytdl-core-discord instead of ytdl-core because it worked much better especially with live videos. Now after they updated discordjs ytdl-core-discord doesnt work anymore so im kindly asking you to please update it.
Thank, Benni