From fa6a9fa2e38edd2afdbb760fcc5cbff171aa9bf0 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Wed, 28 Feb 2024 20:51:59 +0100 Subject: [PATCH] extract member prop early --- events/channels/voiceStateUpdate.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/events/channels/voiceStateUpdate.js b/events/channels/voiceStateUpdate.js index 7d33a76..e0ce9a3 100644 --- a/events/channels/voiceStateUpdate.js +++ b/events/channels/voiceStateUpdate.js @@ -81,7 +81,7 @@ export const name = Events.VoiceStateUpdate; * @param {VoiceState} newState */ export async function execute(oldState, newState) { - const { channel } = newState; + const { channel, member } = newState; let step = 'delete'; try { await leftVoiceChat(oldState); @@ -96,9 +96,6 @@ export async function execute(oldState, newState) { }); if (createCh === null) return; - // Extract user data - const member = newState.member; - step = 'create'; // Extract channel data const channels = newState.guild.channels;