Voice memory leaks
so i am trying to find an optimized way to handle multiple users speaking, since constanty using .subscribe on speaking.on("start") kinda causes memory leaks, my idea is to just once initialize .subscribe and constantly listen to a user (saves to array of buffers) (with their permission ofc, have command for that), and to then use speaking.on("start") and speaking.on("stop") to cut recording in exact piece (start - clear array, stop - turn into mp3, clear array)
5 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.now which thing would be best to check?
1. i for sure have to listen to voiceChange when user joins or leaves
what about when bot joins channel with users
too much listeners
(i followed voice docs and it sucks)
oh so i just can get it like that
but tbh my way still seems more efficient
what is best way to get all users in voice at the time bot joined?
possibly via VoiceConnection class
nvm connection.joinConfig.channeId
and just get users
yes