diff --git a/typings/index.d.ts b/typings/index.d.ts index da94505a4871..d634484aa9f0 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -500,11 +500,10 @@ export class CategoryChannel extends GuildChannel { public readonly children: Collection>; public type: 'GUILD_CATEGORY'; - public createChannel>( + public createChannel>( name: string, options: CategoryCreateChannelOptions & { type: T }, ): Promise; - /** @deprecated See [Self-serve Game Selling Deprecation](https://support-dev.discord.com/hc/en-us/articles/4414590563479) for more information */ public createChannel( name: string, @@ -3009,13 +3008,19 @@ export class GuildChannelManager extends CachedManager); public readonly channelCountWithoutThreads: number; public guild: Guild; - /** @deprecated See [Self-serve Game Selling Deprecation](https://support-dev.discord.com/hc/en-us/articles/4414590563479) for more information */ - public create(name: string, options: GuildChannelCreateOptions & { type: 'GUILD_STORE' }): Promise; - public create( + + public create>( name: string, options: GuildChannelCreateOptions & { type: T }, ): Promise; - public create(name: string, options: GuildChannelCreateOptions): Promise; + + /** @deprecated See [Self-serve Game Selling Deprecation](https://support-dev.discord.com/hc/en-us/articles/4414590563479) for more information */ + public create( + name: string, + options: GuildChannelCreateOptions & { type: 'GUILD_STORE' | ChannelTypes.GUILD_STORE }, + ): Promise; + + public create(name: string, options?: GuildChannelCreateOptions): Promise; public fetch(id: Snowflake, options?: BaseFetchOptions): Promise; public fetch(id?: undefined, options?: BaseFetchOptions): Promise>; public setPositions(channelPositions: readonly ChannelPosition[]): Promise; diff --git a/typings/index.test-d.ts b/typings/index.test-d.ts index 51c99000187d..d20c82162089 100644 --- a/typings/index.test-d.ts +++ b/typings/index.test-d.ts @@ -867,6 +867,8 @@ declare const guildChannelManager: GuildChannelManager; { type AnyChannel = TextChannel | VoiceChannel | CategoryChannel | NewsChannel | StoreChannel | StageChannel; + expectType>(guildChannelManager.create('name')); + expectType>(guildChannelManager.create('name', {})); expectType>(guildChannelManager.create('name', { type: 'GUILD_VOICE' })); expectType>(guildChannelManager.create('name', { type: 'GUILD_CATEGORY' })); expectType>(guildChannelManager.create('name', { type: 'GUILD_TEXT' }));