Skip to content

Commit

Permalink
types(GuildChannelManager): Handle forum channel overload (#8660)
Browse files Browse the repository at this point in the history
types(GuildChannelManager): handle forum channel overload

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
Jiralite and kodiakhq[bot] committed Sep 24, 2022
1 parent 16fcdc3 commit 1486bc9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/discord.js/typings/index.d.ts
Expand Up @@ -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<
Expand Down
1 change: 1 addition & 0 deletions packages/discord.js/typings/index.test-d.ts
Expand Up @@ -1369,6 +1369,7 @@ declare const guildChannelManager: GuildChannelManager;
expectType<Promise<TextChannel>>(guildChannelManager.create({ name: 'name', type: ChannelType.GuildText }));
expectType<Promise<NewsChannel>>(guildChannelManager.create({ name: 'name', type: ChannelType.GuildAnnouncement }));
expectType<Promise<StageChannel>>(guildChannelManager.create({ name: 'name', type: ChannelType.GuildStageVoice }));
expectType<Promise<ForumChannel>>(guildChannelManager.create({ name: 'name', type: ChannelType.GuildForum }));

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

0 comments on commit 1486bc9

Please sign in to comment.