types(WebhooksUpdate): Allow NewsChannels (#6749)

Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
This commit is contained in:
Jiralite
2021-10-03 21:53:20 +01:00
committed by GitHub
parent 7129965423
commit abf158dc94
2 changed files with 3 additions and 3 deletions

View File

@@ -8,9 +8,9 @@ class WebhooksUpdate extends Action {
const client = this.client;
const channel = client.channels.cache.get(data.channel_id);
/**
* Emitted whenever a guild text channel has its webhooks changed.
* Emitted whenever a channel has its webhooks changed.
* @event Client#webhookUpdate
* @param {TextChannel} channel The channel that had a webhook update
* @param {TextChannel|NewsChannel} channel The channel that had a webhook update
*/
if (channel) client.emit(Events.WEBHOOKS_UPDATE, channel);
}

2
typings/index.d.ts vendored
View File

@@ -3449,7 +3449,7 @@ export interface ClientEvents {
typingStart: [typing: Typing];
userUpdate: [oldUser: User | PartialUser, newUser: User];
voiceStateUpdate: [oldState: VoiceState, newState: VoiceState];
webhookUpdate: [channel: TextChannel];
webhookUpdate: [channel: TextChannel | NewsChannel];
/** @deprecated Use interactionCreate instead */
interaction: [interaction: Interaction];
interactionCreate: [interaction: Interaction];