mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
types(WebhooksUpdate): Allow NewsChannels (#6749)
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
This commit is contained in:
@@ -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
2
typings/index.d.ts
vendored
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user