mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
types(Webhook): More accurate type for sourceChannel (#6751)
This commit is contained in:
@@ -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 {
|
||||
|
||||
2
typings/index.d.ts
vendored
2
typings/index.d.ts
vendored
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user