discord.js-selfbot-v13-proxy
Version:
A unofficial discord.js-selfbot-v13 fork for creating selfbots with proxy [Based on discord.js v13]
34 lines (28 loc) • 765 B
JavaScript
const Action = require('./Action');
const { Events } = require('../../util/Constants');
class GuildUpdateAction extends Action {
handle(data) {
const client = this.client;
const guild = client.guilds.cache.get(data.id);
if (guild) {
const old = guild._update(data);
/**
* Emitted whenever a guild is updated - e.g. name change.
* @event Client#guildUpdate
* @param {Guild} oldGuild The guild before the update
* @param {Guild} newGuild The guild after the update
*/
client.emit(Events.GUILD_UPDATE, old, guild);
return {
old,
updated: guild,
};
}
return {
old: null,
updated: null,
};
}
}
module.exports = GuildUpdateAction;
;