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