Audio recording stream

Hiya, I was wondering on how you now create audio streams? I only know is as connection.receiver.createStream(message.member, { mode: 'pcm', end: 'silence' }); I want to use it so I can record the voice chat. Thanks!
4 Replies
d.js toolkit
d.js toolkit8mo 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!
duck
duck8mo ago
it's <VoiceConnection>.receiver.subscribe() now in @discordjs/voice - it only returns an opus stream, but you can import opus from prism-media and decode the opus to pcm with the opus.Decoder class - end would be an object with the behavior property for which you can use the EndBehaviorType enum
d.js docs
d.js docs8mo ago
:method: VoiceReceiver#subscribe() Creates a subscription for the given user id.
Want results from more Discord servers?
Add your server