21 lines
601 B
JavaScript
21 lines
601 B
JavaScript
'use strict';
|
|
|
|
const Action = require('./Action');
|
|
const { Events } = require('../../util/Constants');
|
|
|
|
class WebhooksUpdate extends Action {
|
|
handle(data) {
|
|
const client = this.client;
|
|
const channel = client.channels.cache.get(data.channel_id);
|
|
/**
|
|
* Emitted whenever a channel has its webhooks changed.
|
|
* @event Client#webhookUpdate
|
|
* @param {TextChannel|NewsChannel|VoiceChannel|StageChannel|ForumChannel} channel
|
|
* The channel that had a webhook update
|
|
*/
|
|
if (channel) client.emit(Events.WEBHOOKS_UPDATE, channel);
|
|
}
|
|
}
|
|
|
|
module.exports = WebhooksUpdate;
|