Skip to content

Commit

Permalink
Merge pull request #275 from EdVoids/patch-5
Browse files Browse the repository at this point in the history
Issue bot wont disconnect after play music
  • Loading branch information
Sai Teja Madha authored Jan 31, 2023
2 parents 93dffa9 + f1686e5 commit 9f89670
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.destroy(); // 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 9f89670

Please sign in to comment.