createAudioResource()
Im not sure to i should ask this here or in help channel but im going there.
In docs it takes
string
as resource input that is a file location, but i want to ask what else we can use to create a resource or directly a resource something like a Buffer
or anything else
For further explanation i want to store them in mongoose database and use them in future but im not sure how i can store a audio file in mongoose or i can use it or not12 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!ping me or mention my message when replying
createAudioResouce()
will accept a direct link or path to a file along with a readable stream. I wouldnt try storing audio to a database. Rather just store it in a file locally or on a server.what is AudioResource that function returns
a buffer?
also what server do prefer that service is free because i just want to try how can i do something that will be just a try project
audioResourse is just a djs specific thing that can be played by an audioPlayer
oh that makes sense
you could use a server just if youd happen to have one. Otherwise if youre just testing locally just do it all there.
can i use a file from a url
yes
nice that will be a good solution
Okay, so. I have tried, MP3, OGG, and links to an audio file but everytime I try the error "throw new Error('FFmpeg/avcnov not found!'); I'm grasping here. I've spent the last three hours trying methods.
- 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