Quit if alone
Some checks failed
Dat_Boi upload to portainer / Deploy (push) Failing after 2s

This commit is contained in:
2025-07-05 20:25:40 +02:00
parent 764aa7bced
commit e9b9e303a5

View File

@ -115,6 +115,13 @@ module.exports = async (client, oldState, voiceState) => {
oldNetworking?.off('stateChange', networkStateChangeHandler);
newNetworking?.on('stateChange', networkStateChangeHandler);
// If alone in channel, quit
if (voiceState.channel.members.filter(m => !m.user.bot && m.id !== client.user.id).size < 1) {
connection.destroy();
shouldStop = true;
return;
}
});
player = createAudioPlayer({