From d8b8a1c4ac6774f0dee3ef1b6cc289a34dd2947f Mon Sep 17 00:00:00 2001 From: WubzyGD Date: Thu, 29 Apr 2021 18:43:24 -0600 Subject: [PATCH] last of the buggybois i swear --- events/voiceStateUpdate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/events/voiceStateUpdate.js b/events/voiceStateUpdate.js index 265f1fa..b80e837 100644 --- a/events/voiceStateUpdate.js +++ b/events/voiceStateUpdate.js @@ -9,8 +9,8 @@ module.exports = async (client, oldState, voice) => { if (!client.misc.cache.activeVC.includes(voice.channelID)) {client.misc.cache.activeVC.push(voice.channelID);} } else { if (!client.misc.cache.inVC.includes(voice.member.id)) {return;} - client.misc.inVC.splice(client.misc.inVC.indexOf(voice.member.id), 1); - if (!voice.channel.members.size && client.misc.activeVC.includes(voice.channelID)) {client.misc.activeVC.splice(client.misc.activeVC.indexOf(voice.channelID), 1);} + client.misc.cache.inVC.splice(client.misc.cache.inVC.indexOf(voice.member.id), 1); + if (!voice.channel.members.size && client.misc.cache.activeVC.includes(voice.channelID)) {client.misc.cache.activeVC.splice(client.misc.cache.activeVC.indexOf(voice.channelID), 1);} if (Object.keys(client.misc.cache.VCG).includes(voice.member.id)) {delete client.misc.cache.VCG[voice.member.id];} } }