mirror of
https://github.com/Ninluc/Dat_Boi.git
synced 2025-08-07 08:56:14 +02:00
This commit is contained in:
@ -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({
|
||||
|
Reference in New Issue
Block a user