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
- 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!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