From be1d33ee1b37ff32a51453258c4f955107717422 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 4 Dec 2021 11:10:31 +0800 Subject: [PATCH] fix: bot not leaving when alone --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 5dcc6fa6..6d63e324 100644 --- a/main.js +++ b/main.js @@ -56,7 +56,7 @@ bot.music.on('trackStart', queue => { clearTimeout(queue.player.timeout); delete queue.player.timeout; } - if (bot.guilds.cache.get(queue.player.guildId).channels.cache.get(queue.player.channelId).members?.filter(m => !m.bot).size < 1) { + if (bot.guilds.cache.get(queue.player.guildId).channels.cache.get(queue.player.channelId).members?.filter(m => !m.user.bot).size < 1) { console.log(`[G ${queue.player.guildId}] Disconnecting (alone)`); queue.player.disconnect(); bot.music.destroyPlayer(queue.player.guildId);