19 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- 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[email protected]
node v18.11.0
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
if your connection doesn't enter the ready state please ensure you have the
GuildVoiceStates
intentit showing no errors
that's great
does the connection enter the ready state?
console:
player is playing
player is playing
so yes it is
that just tells you that the player is playing
please actually check if the connection enters the ready state
im not really sure how.. can you please help me?
well in your original code, you weren't storing the
VoiceConnection
that joinVoiceChannel
returns, so you'd first need to do that
then you can listen for the status on the connection in the same way you're doing with your player (except with the VoiceConnectionStatus
enum instead) like that?
console:
Connection
Connection
well if you intend to listen to state changes like that, it'd probably help to actually log the states
the connection does enter to the ready state.
then do you have the proper dependencies to play an mp3 file?
could you generate a dependency report?
sounds like you're missing an opus library
please install one
installed
Oh its working!
thank you !
@duck