From 5ec542d61fc47e6f150d96f5f4578ae2901d1cc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Rom=C3=A1n?= Date: Tue, 7 Dec 2021 20:15:04 +0100 Subject: [PATCH] fix(StoreChannel): mark as deprecated (#7072) --- typings/index.d.ts | 5 +++++ typings/index.test-d.ts | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/typings/index.d.ts b/typings/index.d.ts index 4cdc0473afcd..02f61c8d8938 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -469,6 +469,7 @@ export class CategoryChannel extends GuildChannel { name: string, options: CategoryCreateChannelOptions & { type: 'GUILD_NEWS' }, ): 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, options: CategoryCreateChannelOptions & { type: 'GUILD_STORE' }, @@ -2054,10 +2055,13 @@ export class StickerPack extends Base { public bannerURL(options?: StaticImageURLOptions): string; } +/** @deprecated See [Self-serve Game Selling Deprecation](https://support-dev.discord.com/hc/en-us/articles/4414590563479) for more information */ export class StoreChannel extends GuildChannel { private constructor(guild: Guild, data?: RawGuildChannelData, client?: Client); public createInvite(options?: CreateInviteOptions): Promise; public fetchInvites(cache?: boolean): Promise>; + /** @deprecated See [Self-serve Game Selling Deprecation](https://support-dev.discord.com/hc/en-us/articles/4414590563479) for more information */ + public clone(options?: GuildChannelCloneOptions): Promise; public nsfw: boolean; public type: 'GUILD_STORE'; } @@ -2807,6 +2811,7 @@ export class GuildChannelManager extends CachedManager< ): Promise; public create(name: string, options?: GuildChannelCreateOptions & { type?: 'GUILD_TEXT' }): Promise; public create(name: string, options: GuildChannelCreateOptions & { type: 'GUILD_NEWS' }): 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' }): Promise; public create( name: string, diff --git a/typings/index.test-d.ts b/typings/index.test-d.ts index 754776f77dc1..68ac0092b33b 100644 --- a/typings/index.test-d.ts +++ b/typings/index.test-d.ts @@ -747,6 +747,9 @@ declare const dmChannel: DMChannel; declare const threadChannel: ThreadChannel; declare const newsChannel: NewsChannel; declare const textChannel: TextChannel; +declare const storeChannel: StoreChannel; +declare const categoryChannel: CategoryChannel; +declare const guild: Guild; declare const user: User; declare const guildMember: GuildMember; @@ -763,6 +766,10 @@ expectType(threadChannel.lastMessage); expectType(newsChannel.lastMessage); expectType(textChannel.lastMessage); +expectDeprecated(storeChannel.clone()); +expectDeprecated(categoryChannel.createChannel('Store', { type: 'GUILD_STORE' })); +expectDeprecated(guild.channels.create('Store', { type: 'GUILD_STORE' })); + notPropertyOf(user, 'lastMessage'); notPropertyOf(user, 'lastMessageId'); notPropertyOf(guildMember, 'lastMessage'); @@ -1068,7 +1075,6 @@ collector.on('end', (collection, reason) => { expectType>(shard.eval(c => c.readyTimestamp)); // Test audit logs -declare const guild: Guild; expectType>>(guild.fetchAuditLogs({ type: 'MEMBER_KICK' })); expectAssignable>>( guild.fetchAuditLogs({ type: GuildAuditLogs.Actions.MEMBER_KICK }),