2022-03-19 10:37:45 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const Action = require('./Action');
|
2022-03-24 10:55:32 +00:00
|
|
|
const { Events } = require('../../util/Constants');
|
2022-03-19 10:37:45 +00:00
|
|
|
|
|
|
|
class GuildIntegrationsUpdate extends Action {
|
|
|
|
handle(data) {
|
|
|
|
const client = this.client;
|
|
|
|
const guild = client.guilds.cache.get(data.guild_id);
|
|
|
|
/**
|
|
|
|
* Emitted whenever a guild integration is updated
|
|
|
|
* @event Client#guildIntegrationsUpdate
|
|
|
|
* @param {Guild} guild The guild whose integrations were updated
|
|
|
|
*/
|
2022-03-24 10:55:32 +00:00
|
|
|
if (guild) client.emit(Events.GUILD_INTEGRATIONS_UPDATE, guild);
|
2022-03-19 10:37:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = GuildIntegrationsUpdate;
|