mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
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>
This commit is contained in:
2
packages/discord.js/typings/index.d.ts
vendored
2
packages/discord.js/typings/index.d.ts
vendored
@@ -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<
|
||||
|
||||
@@ -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>>>(
|
||||
|
||||
Reference in New Issue
Block a user