From 3956eb6fae21eaf0ca989611900f41158d80cc13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20H?= Date: Wed, 22 Apr 2020 09:53:55 +0200 Subject: [PATCH] fix --- events/voiceStateUpdate.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/events/voiceStateUpdate.js b/events/voiceStateUpdate.js index 56d7fdb..c3c20c7 100644 --- a/events/voiceStateUpdate.js +++ b/events/voiceStateUpdate.js @@ -16,6 +16,9 @@ module.exports = (client, oldState, newState) => { if(guild.voiceChannel.members.size == 1 && guild.autoDisconnect) { setTimeout(() => { if(guild.voiceChannel.members.size == 1 && guild.autoDisconnect) { + guild.playing = false; + guild.queue = []; + // Probably should be async? But no need here I think guild.dispatcher.end('silent'); guild.message.channel.send('No one is listening to me. Leaving voice chat!');