types(Webhook): More accurate type for sourceChannel (#6751)

This commit is contained in:
Jiralite
2021-10-03 21:53:37 +01:00
committed by GitHub
parent abf158dc94
commit 32b5c2e617
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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 {
+1 -1
View File
@@ -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;
}