From 251eb7f5a122a02af6cff7061559319e1f6220a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Wed, 4 Aug 2021 13:52:30 +0300 Subject: [PATCH] Fix VoiceStateUpdate --- src/client/events/voiceStateUpdate.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/events/voiceStateUpdate.js b/src/client/events/voiceStateUpdate.js index e97c1ad..ded8338 100644 --- a/src/client/events/voiceStateUpdate.js +++ b/src/client/events/voiceStateUpdate.js @@ -21,8 +21,8 @@ module.exports = { ); } catch (error) { client.funcs.statisticsUpdate(client, newState.guild, radio); - radio.connection.dispatcher.destroy(); - radio.voiceChannel.leave(); + radio.connection.destroy(); + radio.audioPlayer.stop(); client.radio.delete(oldState.guild.id); } return; @@ -38,8 +38,8 @@ module.exports = { if (!radio || !radio.connection.dispatcher || !radio.connection.dispatcher === null) return; if (radio.voiceChannel.members.size === 1) { client.funcs.statisticsUpdate(client, newState.guild, radio); - radio.connection.dispatcher.destroy(); - radio.voiceChannel.leave(); + radio.connection.destroy(); + radio.audioPlayer.stop(); client.radio.delete(newState.guild.id); } }, 120000);