This commit is contained in:
Christer Warén 2020-08-03 13:02:52 +03:00
parent 22b4ab146f
commit 3c283a52e0

View File

@ -32,7 +32,7 @@ module.exports = {
} }
if (oldState.channel.members.size === 1 && oldState.channel === radio.voiceChannel || change) { if (oldState.channel.members.size === 1 && oldState.channel === radio.voiceChannel || change) {
setTimeout(() => { setTimeout(() => {
if (!radio) return; if (!radio || !radio.connection.dispatcher || !radio.connection.dispatcher === null) return;
if (radio.voiceChannel.members.size === 1) { if (radio.voiceChannel.members.size === 1) {
client.funcs.statisticsUpdate(client, newState.guild, radio); client.funcs.statisticsUpdate(client, newState.guild, radio);
radio.connection.dispatcher.destroy(); radio.connection.dispatcher.destroy();
@ -42,4 +42,4 @@ module.exports = {
}, 120000); }, 120000);
} }
} }
}; };