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 not
12 Replies
d.js toolkit
d.js toolkit16mo ago
- 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!
@flexyz
@flexyzOP16mo ago
ping me or mention my message when replying
Matte
Matte16mo ago
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.
@flexyz
@flexyzOP16mo ago
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
Matte
Matte16mo ago
audioResourse is just a djs specific thing that can be played by an audioPlayer
@flexyz
@flexyzOP16mo ago
oh that makes sense
Matte
Matte16mo ago
you could use a server just if youd happen to have one. Otherwise if youre just testing locally just do it all there.
@flexyz
@flexyzOP16mo ago
can i use a file from a url
Matte
Matte16mo ago
yes
@flexyz
@flexyzOP16mo ago
nice that will be a good solution
xX_BussyCreamer69_Xx
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.
d.js docs
d.js docs15mo ago
- 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
Want results from more Discord servers?
Add your server