SpeakingMap stops triggering 'start' events after some time

My bot is connected to the voice channel through a VoiceConnection and has a VoiceReceiver. I added an event listener for the 'start' event of the SpeakingMap. It seems to work fine for around 1 minute then stops triggering. Any help would be appreciated.
2 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
vikram
vikramOP2y ago
[email protected], discordjs/[email protected], node v16.15.1
let channel = client.channels.cache.get(channelId);

const connection = joinVoiceChannel({
channelId: channel.id,
guildId: channel.guild.id,
adapterCreator: channel.guild.voiceAdapterCreator,
selfDeaf: false,
});

const rec = connection.receiver;
rec.speaking.on('start', (userId) => {
console.log('SPEAKING');

});
let channel = client.channels.cache.get(channelId);

const connection = joinVoiceChannel({
channelId: channel.id,
guildId: channel.guild.id,
adapterCreator: channel.guild.voiceAdapterCreator,
selfDeaf: false,
});

const rec = connection.receiver;
rec.speaking.on('start', (userId) => {
console.log('SPEAKING');

});
Nevermind, just needed to update discordjs/voice https://discord.com/channels/222078108977594368/1084325632281956362
Want results from more Discord servers?
Add your server