mirror of
https://github.com/Ninluc/Dat_Boi.git
synced 2025-08-09 23:26:13 +02:00
This commit is contained in:
@ -115,6 +115,13 @@ module.exports = async (client, oldState, voiceState) => {
|
|||||||
|
|
||||||
oldNetworking?.off('stateChange', networkStateChangeHandler);
|
oldNetworking?.off('stateChange', networkStateChangeHandler);
|
||||||
newNetworking?.on('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({
|
player = createAudioPlayer({
|
||||||
|
Reference in New Issue
Block a user