Skip to content

Commit 1486bc9

Browse files
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>
1 parent 16fcdc3 commit 1486bc9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/discord.js/typings/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ export interface MappedChannelCategoryTypes {
706706
[ChannelType.GuildVoice]: VoiceChannel;
707707
[ChannelType.GuildText]: TextChannel;
708708
[ChannelType.GuildStageVoice]: StageChannel;
709-
[ChannelType.GuildForum]: never; // TODO: Fix when guild forums come out
709+
[ChannelType.GuildForum]: ForumChannel;
710710
}
711711

712712
export type CategoryChannelType = Exclude<

packages/discord.js/typings/index.test-d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,6 +1369,7 @@ declare const guildChannelManager: GuildChannelManager;
13691369
expectType<Promise<TextChannel>>(guildChannelManager.create({ name: 'name', type: ChannelType.GuildText }));
13701370
expectType<Promise<NewsChannel>>(guildChannelManager.create({ name: 'name', type: ChannelType.GuildAnnouncement }));
13711371
expectType<Promise<StageChannel>>(guildChannelManager.create({ name: 'name', type: ChannelType.GuildStageVoice }));
1372+
expectType<Promise<ForumChannel>>(guildChannelManager.create({ name: 'name', type: ChannelType.GuildForum }));
13721373

13731374
expectType<Promise<Collection<Snowflake, NonThreadGuildBasedChannel | null>>>(guildChannelManager.fetch());
13741375
expectType<Promise<Collection<Snowflake, NonThreadGuildBasedChannel | null>>>(

0 commit comments

Comments
 (0)