From 32b5c2e617ab091adb4697859330a793e8f30598 Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Sun, 3 Oct 2021 21:53:37 +0100 Subject: [PATCH] types(Webhook): More accurate type for `sourceChannel` (#6751) --- src/structures/Webhook.js | 2 +- typings/index.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js index cb6340188..a3854492a 100644 --- a/src/structures/Webhook.js +++ b/src/structures/Webhook.js @@ -98,7 +98,7 @@ class Webhook { if ('source_channel' in data) { /** * The source channel of the webhook - * @type {?(Channel|APIChannel)} + * @type {?(NewsChannel|APIChannel)} */ this.sourceChannel = this.client.channels?.resolve(data.source_channel?.id) ?? data.source_channel; } else { diff --git a/typings/index.d.ts b/typings/index.d.ts index e639d7e4a..7a3ef5b3e 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -2135,7 +2135,7 @@ export class Webhook extends WebhookMixin() { public name: string; public owner: User | APIUser | null; public sourceGuild: Guild | APIPartialGuild | null; - public sourceChannel: Channel | APIPartialChannel | null; + public sourceChannel: NewsChannel | APIPartialChannel | null; public token: string | null; public type: WebhookType; }