Skip to content

Commit

Permalink
Update voiceStateUpdate.js
Browse files Browse the repository at this point in the history
  • Loading branch information
EdVoids authored Dec 13, 2022
1 parent 67370c5 commit f1686e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/events/voice/voiceStateUpdate.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = async (client, oldState, newState) => {
// if 1 (you), wait 1 minute
if (!oldState.channel.members.size - 1) {
const player = client.musicManager.getPlayer(guild.id);
if (player) player.disconnect(); // destroy the player
if (player) client.musicManager.destroyPlayer(guild.id).then(player.disconnect()); // destroy the player
}
}, client.config.MUSIC.IDLE_TIME * 1000);
}
Expand Down

0 comments on commit f1686e5

Please sign in to comment.