Playing a soundfile
I'm trying to use discord.js voice to play a sound file. Is my thinking in how to get this to work in the right direction here or am I missing important parts here?
2 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!Discord.js:
[email protected]
Node: v16.15.1
I'm attempting to play a sound file. The bot joins voice (done through code elsewhere in the bot), but does not start playing sound through the code provided above.
Upon logging the resource
variable, I am shown an AudioResource variable with a length
/playbackDuration
of 0, now I'm not sure if this because it is unable to read the file's contents or if it can't read the file itself.