AudioPlayer not working, not sure what's wrong
The bot autopauses for no reason. Here are the logs:
7 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 OPplease run npm ls discord.js, and node -v commands separately
you need some dependencies for playing audio too, ffmpeg, discordjs/opus, sodium and some other things that you can check in the guide
You are right, I didn't have these packages installed, but I have now installed them and still same problem
I have edited my comment above
dont install ffmpeg through npm, you need to get the binaries from the internet and put them in your environment
- npm:
npm install ffmpeg-static
- Install: Download | chocolatey | homebrew | your distributions package manager
- Tutorial: YouTube
- ffmpeg-binaries is deprecated, uninstall it with npm rm ffmpeg-binaries
one of those choices (not ffmpeg binaries)
once you resolve that make sure you have the GuildVoiceStates intent enabled in your bot
you could actually try with the intent first and see if that resolves it. The other thing i notice is that you are not creating an audio resource from the url to be played with the audioplayer you are instead directly passing the url to the player which im not entirely sure if that works
sorted
thank you]