From 6f1f465a77e362e20ec50067be0e634d35946ba5 Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Wed, 21 Sep 2022 01:57:18 +0100 Subject: [PATCH] feat(WelcomeChannel): Add forum channel as a type (#8643) --- packages/discord.js/src/structures/Guild.js | 2 +- packages/discord.js/src/structures/WelcomeChannel.js | 2 +- packages/discord.js/typings/index.d.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/discord.js/src/structures/Guild.js b/packages/discord.js/src/structures/Guild.js index dd564ccacab0..29ff74e97d16 100644 --- a/packages/discord.js/src/structures/Guild.js +++ b/packages/discord.js/src/structures/Guild.js @@ -831,7 +831,7 @@ class Guild extends AnonymousGuild { * Welcome channel data * @typedef {Object} WelcomeChannelData * @property {string} description The description to show for this welcome channel - * @property {GuildTextChannelResolvable} channel The channel to link for this welcome channel + * @property {TextChannel|NewsChannel|ForumChannel|Snowflake} channel The channel to link for this welcome channel * @property {EmojiIdentifierResolvable} [emoji] The emoji to display for this welcome channel */ diff --git a/packages/discord.js/src/structures/WelcomeChannel.js b/packages/discord.js/src/structures/WelcomeChannel.js index 81f604796383..d783e0610e99 100644 --- a/packages/discord.js/src/structures/WelcomeChannel.js +++ b/packages/discord.js/src/structures/WelcomeChannel.js @@ -42,7 +42,7 @@ class WelcomeChannel extends Base { /** * The channel of this welcome channel - * @type {?(TextChannel|NewsChannel)} + * @type {?(TextChannel|NewsChannel|ForumChannel)} */ get channel() { return this.client.channels.resolve(this.channelId); diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index d48256337996..796ce250a5ee 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -3050,7 +3050,7 @@ export class WelcomeChannel extends Base { public channelId: Snowflake; public guild: Guild | InviteGuild; public description: string; - public get channel(): TextChannel | NewsChannel | null; + public get channel(): TextChannel | NewsChannel | ForumChannel | null; public get emoji(): GuildEmoji | Emoji; } @@ -5738,7 +5738,7 @@ export interface WidgetChannel { export interface WelcomeChannelData { description: string; - channel: GuildTextChannelResolvable; + channel: TextChannel | NewsChannel | ForumChannel | Snowflake; emoji?: EmojiIdentifierResolvable; }