Skip to content

Commit

Permalink
fix: bot not leaving when alone
Browse files Browse the repository at this point in the history
  • Loading branch information
Max committed Dec 4, 2021
1 parent 03266e2 commit be1d33e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit be1d33e

Please sign in to comment.