Files
discord.js-selfbot/src/client/actions/WebhooksUpdate.js
March 7th 305ccaac90 v2.2.0
Discord.js v13.8.0
2022-06-06 11:21:36 +07:00

20 lines
568 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} channel The channel that had a webhook update
*/
if (channel) client.emit(Events.WEBHOOKS_UPDATE, channel);
}
}
module.exports = WebhooksUpdate;