From 062a163a1191122d6bb88d1cbd6d0fd7f7881ecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Thu, 16 Sep 2021 04:53:15 +0300 Subject: [PATCH] Update voiceStateUpdate event --- src/client/events/voiceStateUpdate.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/events/voiceStateUpdate.js b/src/client/events/voiceStateUpdate.js index 3eeb658..d180e2c 100644 --- a/src/client/events/voiceStateUpdate.js +++ b/src/client/events/voiceStateUpdate.js @@ -14,7 +14,7 @@ module.exports = { if (newState.member.id === client.user.id && oldState.member.id === client.user.id) { if (newState.channel === null) { - client.funcs.statisticsUpdate(client, newState.guild, radio); + client.statistics.update(client, newState.guild, radio); radio.connection?.destroy(); radio.message?.delete(); client.funcs.logger('Radio', newState.guild.id + " / " + 'Stop'); @@ -36,7 +36,7 @@ module.exports = { 1000 ); } catch (error) { - client.funcs.statisticsUpdate(client, newState.guild, radio); + client.statistics.update(client, newState.guild, radio); radio.connection?.destroy(); radio.message?.delete(); client.funcs.logger('Radio', newState.guild.id + " / " + 'Stop'); @@ -55,7 +55,7 @@ module.exports = { setTimeout(() => { if (!radio || !radio.connection || !radio.connection === null) return; if (radio.voiceChannel.members.size === 1) { - client.funcs.statisticsUpdate(client, newState.guild, radio); + client.statistics.update(client, newState.guild, radio); radio.connection?.destroy(); radio.message?.delete(); client.funcs.logger('Radio', newState.guild.id + " / " + 'Stop');