extract member prop early

This commit is contained in:
Baipyrus 2024-02-28 20:51:59 +01:00
parent 73562b3570
commit fa6a9fa2e3

View File

@ -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;