Audio not playing despite properly retrieving URL to audio. No errors.
I'm trying to play a song through a URL (not YouTube) and despite the URL ending with
.ogg
(i even tried with .mp3
), audio isn't emitted. There is no errors or anything alike, it just doesn't play. What do I do please? I have installed FFmpeg
, @discordjs/voice
and @discordjs/opus
.
(Code will be in the comments because it's too long)14 Replies
- What are your intents?
GuildVoiceStates
is required to receive voice data!
- Show what dependencies you are using -- generateDependencyReport()
is exported from @discordjs/voice
.
- Try looking at common examples: https://github.com/discordjs/voice-examples.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by OP
(i did remove the unnecessary lines of code for the purpose of this thread)
this is the only feedback i got from the bot
(also apologies for sending this on #djs-questions, i didn't notice this channel 😅 )
yeah! let me send it here
this is if i log response.body alone
and if i do the resource:
it was reporting that it was playing an .ogg.. now it's not?
i think its because i installed libopus as i was trying to debug it
i see so, remove inlinevolume?
or libopus?
okay!
To debug your voice connection and player:
- Use
debug: true
when creating your VoiceConnection
and AudioPlayer
- Add an event listener to the <VoiceConnection> and the <AudioPlayer>:
- Add an error
listener to the stream you are passing to the resource:
Note: The <>
represents classes that need to be adapted to their respective name in your code
okay i will try!
i got this
status autopaused???
i haven't, let me try
nothing
i tried doing some research about it, there was an old workaround for it but it seems that it used to be a bug that got patched. im not sure what's going on
i tried adding
GatewayIntentBits.GuildVoiceStates
and now its printing theseuhh... dunno. it did though LOL
OH
it just- started playing. half way through the song
its working now but it's verrrry choppy..??
how do i go about that?
i see, ill do my research on that!
i went ahead and utilized it
-# honestly i did use AI for help because it's late and my head can't wrap around it all that well 🥲
it still seems to be a bit choppy but it's better. it might be my internet since for whatever reason my laptop handles my internet poorly
thanks for the help! :)