From a0ff4f3905bb9a79fc8f581d7823e506c61f851a Mon Sep 17 00:00:00 2001 From: Vitor Lopes Date: Fri, 13 May 2022 14:57:03 +0100 Subject: [PATCH] refactor: add support for API v10 (#437) --- deno/payloads/v10/application.ts | 6 ++++++ deno/payloads/v10/channel.ts | 4 ---- deno/payloads/v9/application.ts | 6 ++++++ deno/rest/v10/guild.ts | 2 +- payloads/v10/application.ts | 6 ++++++ payloads/v10/channel.ts | 4 ---- payloads/v9/application.ts | 6 ++++++ rest/v10/guild.ts | 2 +- 8 files changed, 26 insertions(+), 10 deletions(-) diff --git a/deno/payloads/v10/application.ts b/deno/payloads/v10/application.ts index 22bba977..ea6d6779 100644 --- a/deno/payloads/v10/application.ts +++ b/deno/payloads/v10/application.ts @@ -53,6 +53,12 @@ export interface APIApplication { * See https://discord.com/developers/docs/resources/user#user-object */ owner?: APIUser; + /** + * An empty string + * + * @deprecated This field will be removed in v11 + */ + summary: string; /** * The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function * diff --git a/deno/payloads/v10/channel.ts b/deno/payloads/v10/channel.ts index 4bd4ec8f..65c63e9b 100644 --- a/deno/payloads/v10/channel.ts +++ b/deno/payloads/v10/channel.ts @@ -770,10 +770,6 @@ export interface APIThreadList { * The members for the client user in each of the fetched threads */ members: APIThreadMember[]; - /** - * Whether there are potentially additional threads - */ - has_more?: boolean; } /** diff --git a/deno/payloads/v9/application.ts b/deno/payloads/v9/application.ts index 22bba977..ea6d6779 100644 --- a/deno/payloads/v9/application.ts +++ b/deno/payloads/v9/application.ts @@ -53,6 +53,12 @@ export interface APIApplication { * See https://discord.com/developers/docs/resources/user#user-object */ owner?: APIUser; + /** + * An empty string + * + * @deprecated This field will be removed in v11 + */ + summary: string; /** * The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function * diff --git a/deno/rest/v10/guild.ts b/deno/rest/v10/guild.ts index b9478b85..fb3f52f7 100644 --- a/deno/rest/v10/guild.ts +++ b/deno/rest/v10/guild.ts @@ -339,7 +339,7 @@ export type RESTPatchAPIGuildChannelPositionsResult = never; /** * https://discord.com/developers/docs/resources/guild#list-active-threads */ -export type RESTGetAPIGuildThreadsResult = Omit; +export type RESTGetAPIGuildThreadsResult = APIThreadList; /** * https://discord.com/developers/docs/resources/guild#get-guild-member diff --git a/payloads/v10/application.ts b/payloads/v10/application.ts index 8c5bbbbf..8b31ad68 100644 --- a/payloads/v10/application.ts +++ b/payloads/v10/application.ts @@ -53,6 +53,12 @@ export interface APIApplication { * See https://discord.com/developers/docs/resources/user#user-object */ owner?: APIUser; + /** + * An empty string + * + * @deprecated This field will be removed in v11 + */ + summary: string; /** * The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function * diff --git a/payloads/v10/channel.ts b/payloads/v10/channel.ts index 89eca06a..f94d0320 100644 --- a/payloads/v10/channel.ts +++ b/payloads/v10/channel.ts @@ -770,10 +770,6 @@ export interface APIThreadList { * The members for the client user in each of the fetched threads */ members: APIThreadMember[]; - /** - * Whether there are potentially additional threads - */ - has_more?: boolean; } /** diff --git a/payloads/v9/application.ts b/payloads/v9/application.ts index 8c5bbbbf..8b31ad68 100644 --- a/payloads/v9/application.ts +++ b/payloads/v9/application.ts @@ -53,6 +53,12 @@ export interface APIApplication { * See https://discord.com/developers/docs/resources/user#user-object */ owner?: APIUser; + /** + * An empty string + * + * @deprecated This field will be removed in v11 + */ + summary: string; /** * The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function * diff --git a/rest/v10/guild.ts b/rest/v10/guild.ts index f01454de..85dc74d0 100644 --- a/rest/v10/guild.ts +++ b/rest/v10/guild.ts @@ -339,7 +339,7 @@ export type RESTPatchAPIGuildChannelPositionsResult = never; /** * https://discord.com/developers/docs/resources/guild#list-active-threads */ -export type RESTGetAPIGuildThreadsResult = Omit; +export type RESTGetAPIGuildThreadsResult = APIThreadList; /** * https://discord.com/developers/docs/resources/guild#get-guild-member