mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
* chore: consistency/prettier * chore: rebase * chore: rebase * chore: include typings * fix: include typings file in prettier lint-staged
20 lines
554 B
JavaScript
20 lines
554 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 guild text channel has its webhooks changed.
|
|
* @event Client#webhookUpdate
|
|
* @param {TextChannel} channel The channel that had a webhook update
|
|
*/
|
|
if (channel) client.emit(Events.WEBHOOKS_UPDATE, channel);
|
|
}
|
|
}
|
|
|
|
module.exports = WebhooksUpdate;
|