generated from Baipyrus/DiscordJS-Template
extract member prop early
This commit is contained in:
parent
73562b3570
commit
fa6a9fa2e3
@ -81,7 +81,7 @@ export const name = Events.VoiceStateUpdate;
|
|||||||
* @param {VoiceState} newState
|
* @param {VoiceState} newState
|
||||||
*/
|
*/
|
||||||
export async function execute(oldState, newState) {
|
export async function execute(oldState, newState) {
|
||||||
const { channel } = newState;
|
const { channel, member } = newState;
|
||||||
let step = 'delete';
|
let step = 'delete';
|
||||||
try {
|
try {
|
||||||
await leftVoiceChat(oldState);
|
await leftVoiceChat(oldState);
|
||||||
@ -96,9 +96,6 @@ export async function execute(oldState, newState) {
|
|||||||
});
|
});
|
||||||
if (createCh === null) return;
|
if (createCh === null) return;
|
||||||
|
|
||||||
// Extract user data
|
|
||||||
const member = newState.member;
|
|
||||||
|
|
||||||
step = 'create';
|
step = 'create';
|
||||||
// Extract channel data
|
// Extract channel data
|
||||||
const channels = newState.guild.channels;
|
const channels = newState.guild.channels;
|
||||||
|
Loading…
Reference in New Issue
Block a user