From 1486bc9336369d229972df5e28b9428365b92bff Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Sat, 24 Sep 2022 15:40:19 +0100 Subject: [PATCH] types(GuildChannelManager): Handle forum channel overload (#8660) types(GuildChannelManager): handle forum channel overload Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- packages/discord.js/typings/index.d.ts | 2 +- packages/discord.js/typings/index.test-d.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 5310ab667c5b..0fe1321bc58a 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -706,7 +706,7 @@ export interface MappedChannelCategoryTypes { [ChannelType.GuildVoice]: VoiceChannel; [ChannelType.GuildText]: TextChannel; [ChannelType.GuildStageVoice]: StageChannel; - [ChannelType.GuildForum]: never; // TODO: Fix when guild forums come out + [ChannelType.GuildForum]: ForumChannel; } export type CategoryChannelType = Exclude< diff --git a/packages/discord.js/typings/index.test-d.ts b/packages/discord.js/typings/index.test-d.ts index 1fef7ceeda41..5284d4dccbcd 100644 --- a/packages/discord.js/typings/index.test-d.ts +++ b/packages/discord.js/typings/index.test-d.ts @@ -1369,6 +1369,7 @@ declare const guildChannelManager: GuildChannelManager; expectType>(guildChannelManager.create({ name: 'name', type: ChannelType.GuildText })); expectType>(guildChannelManager.create({ name: 'name', type: ChannelType.GuildAnnouncement })); expectType>(guildChannelManager.create({ name: 'name', type: ChannelType.GuildStageVoice })); + expectType>(guildChannelManager.create({ name: 'name', type: ChannelType.GuildForum })); expectType>>(guildChannelManager.fetch()); expectType>>(