From 206eacc30763d78a1c76a830d994921cf73aa16c Mon Sep 17 00:00:00 2001 From: MatteZ02 <47610069+MatteZ02@users.noreply.github.com> Date: Thu, 7 May 2020 12:52:52 +0300 Subject: [PATCH] Update voiceStateUpdate.js --- src/events/clientEvents/voiceStateUpdate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/events/clientEvents/voiceStateUpdate.js b/src/events/clientEvents/voiceStateUpdate.js index 8f980ca5..4ea6e0cd 100644 --- a/src/events/clientEvents/voiceStateUpdate.js +++ b/src/events/clientEvents/voiceStateUpdate.js @@ -20,7 +20,7 @@ module.exports = { } if (oldState.channel.members.size === 1 && oldState.channel === queue.voiceChannel || change) { setTimeout(() => { - if (!queue) return; + if (!queue || !queue.connection.dispatcher || queue.connection.dispatcher === null) return; if (queue.voiceChannel.members.size === 1) { queue.songs = []; queue.looping = false; @@ -30,4 +30,4 @@ module.exports = { }, 120000); } } -} +} \ No newline at end of file