VoiceReceiver - Subscriptions needed before detection of start/end?

I seem to have successfully set up a VoiceReceiver, which is connected to a VoiceConnection: VoiceReceiver { voiceConnection: <ref *1> VoiceConnection { _events: [Object: null prototype] {}, _eventsCount: 0, _maxListeners: undefined, rejoinAttempts: 0, _state: { status: 'ready', adapter: [Object], networking: [Networking] }, joinConfig: { selfDeaf: false, selfMute: false, group: 'default', channelId: '1230241511019515936', guildId: '1228049526762373284', adapterCreator: [Function (anonymous)] }, packets: { server: [Object], state: [Object] }, receiver: VoiceReceiver { voiceConnection: [Circular *1], ssrcMap: [SSRCMap], subscriptions: Map(0) {}, connectionData: [Object], speaking: [SpeakingMap], onWsPacket: [Function: bound onWsPacket], onUdpMessage: [Function: bound onUdpMessage] }, debug: null, onNetworkingClose: [Function: bound onNetworkingClose], onNetworkingStateChange: [Function: bound onNetworkingStateChange], onNetworkingError: [Function: bound onNetworkingError], onNetworkingDebug: [Function: bound onNetworkingDebug], [Symbol(kCapture)]: false }, ssrcMap: SSRCMap { _events: [Object: null prototype] {}, _eventsCount: 0, _maxListeners: undefined, map: Map(0) {}, [Symbol(kCapture)]: false }, subscriptions: Map(0) {}, connectionData: {}, speaking: SpeakingMap { _events: [Object: null prototype] {}, _eventsCount: 0, _maxListeners: undefined, users: Map(0) {}, speakingTimeouts: Map(0) {}, [Symbol(kCapture)]: false }, onWsPacket: [Function: bound onWsPacket], onUdpMessage: [Function: bound onUdpMessage] } However, my speaking.on('start'/'end') calls are still not firing. I'm thinking I need to add userIds to either the SSRCMap or the Subscriptions Map in the receiver - am I on the right track? If so, how to do this?
2 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! - Marked as resolved by OP
geeks
geeksOP8mo ago
I've given this kind of approach a shot, but not sure how to actually get the SSRC (or if that's even what's needed): let userSSRC = member.voice.???? if (userSSRC) { speakingReceiver.subscriptions.set(userSSRC, { userId: member.id, })
Want results from more Discord servers?
Add your server