mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
ESLint stuff...
This commit is contained in:
@@ -1,42 +1,38 @@
|
||||
'use strict';
|
||||
|
||||
const Action = require('./Action');
|
||||
const Constants = require('../../util/Constants');
|
||||
const CloneObject = require('../../util/CloneObject');
|
||||
const Message = require('../../structures/Message');
|
||||
const cloneObject = require('../../util/CloneObject');
|
||||
|
||||
class GuildUpdateAction extends Action {
|
||||
|
||||
constructor(client) {
|
||||
super(client);
|
||||
this.deleted = {};
|
||||
this.timeouts = [];
|
||||
}
|
||||
constructor(client) {
|
||||
super(client);
|
||||
this.deleted = {};
|
||||
this.timeouts = [];
|
||||
}
|
||||
|
||||
handle(data) {
|
||||
handle(data) {
|
||||
const client = this.client;
|
||||
const guild = client.store.get('guilds', data.id);
|
||||
|
||||
let client = this.client;
|
||||
let guild = client.store.get('guilds', data.id);
|
||||
if (guild) {
|
||||
const oldGuild = cloneObject(guild);
|
||||
guild.setup(data);
|
||||
|
||||
if (guild) {
|
||||
let oldGuild = CloneObject(guild);
|
||||
guild.setup(data);
|
||||
if (!oldGuild.equals(data)) {
|
||||
client.emit(Constants.Events.GUILD_UPDATE, oldGuild, guild);
|
||||
}
|
||||
|
||||
if (!oldGuild.equals(data)) {
|
||||
client.emit(Constants.Events.GUILD_UPDATE, oldGuild, guild);
|
||||
}
|
||||
return {
|
||||
old: oldGuild,
|
||||
updated: guild,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
old: oldGuild,
|
||||
updated: guild,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
old: null,
|
||||
updated: null,
|
||||
};
|
||||
}
|
||||
};
|
||||
return {
|
||||
old: null,
|
||||
updated: null,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = GuildUpdateAction;
|
||||
|
||||
Reference in New Issue
Block a user