mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
refactor: make use of destructuring for Constants (#1942)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const Action = require('./Action');
|
||||
const Constants = require('../../util/Constants');
|
||||
const { Events, Status } = require('../../util/Constants');
|
||||
|
||||
class GuildMemberRemoveAction extends Action {
|
||||
handle(data) {
|
||||
@@ -11,7 +11,7 @@ class GuildMemberRemoveAction extends Action {
|
||||
if (member) {
|
||||
guild.memberCount--;
|
||||
guild.members.remove(member.id);
|
||||
if (client.status === Constants.Status.READY) client.emit(Constants.Events.GUILD_MEMBER_REMOVE, member);
|
||||
if (client.status === Status.READY) client.emit(Events.GUILD_MEMBER_REMOVE, member);
|
||||
}
|
||||
}
|
||||
return { guild, member };
|
||||
|
||||
Reference in New Issue
Block a user