From 0cd9b0debbf17f60267bf2f42349fcebea5bf588 Mon Sep 17 00:00:00 2001 From: Almeida Date: Wed, 22 Mar 2023 18:36:51 +0000 Subject: [PATCH] feat(RESTGetAPICurrentUserGuildsQuery): add `with_counts` (#641) --- deno/payloads/v10/guild.ts | 6 ++++-- deno/payloads/v9/guild.ts | 6 ++++-- deno/rest/v10/user.ts | 8 ++++++++ deno/rest/v9/user.ts | 8 ++++++++ payloads/v10/guild.ts | 6 ++++-- payloads/v9/guild.ts | 6 ++++-- rest/v10/user.ts | 8 ++++++++ rest/v9/user.ts | 8 ++++++++ 8 files changed, 48 insertions(+), 8 deletions(-) diff --git a/deno/payloads/v10/guild.ts b/deno/payloads/v10/guild.ts index 0164caf99..d9573e561 100644 --- a/deno/payloads/v10/guild.ts +++ b/deno/payloads/v10/guild.ts @@ -236,11 +236,13 @@ export interface APIGuild extends APIPartialGuild { */ max_video_channel_users?: number; /** - * **This field is only received from https://discord.com/developers/docs/resources/guild#get-guild with the `with_counts` query parameter set to `true`** + * Approximate number of members in this guild, + * returned from the `GET /guilds/` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true` */ approximate_member_count?: number; /** - * **This field is only received from https://discord.com/developers/docs/resources/guild#get-guild with the `with_counts` query parameter set to `true`** + * Approximate number of non-offline members in this guild, + * returned from the `GET /guilds/` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true` */ approximate_presence_count?: number; /** diff --git a/deno/payloads/v9/guild.ts b/deno/payloads/v9/guild.ts index 72a8dc8c8..a9255cb3a 100644 --- a/deno/payloads/v9/guild.ts +++ b/deno/payloads/v9/guild.ts @@ -236,11 +236,13 @@ export interface APIGuild extends APIPartialGuild { */ max_video_channel_users?: number; /** - * **This field is only received from https://discord.com/developers/docs/resources/guild#get-guild with the `with_counts` query parameter set to `true`** + * Approximate number of members in this guild, + * returned from the `GET /guilds/` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true` */ approximate_member_count?: number; /** - * **This field is only received from https://discord.com/developers/docs/resources/guild#get-guild with the `with_counts` query parameter set to `true`** + * Approximate number of non-offline members in this guild, + * returned from the `GET /guilds/` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true` */ approximate_presence_count?: number; /** diff --git a/deno/rest/v10/user.ts b/deno/rest/v10/user.ts index d83a6b846..e52b81dbc 100644 --- a/deno/rest/v10/user.ts +++ b/deno/rest/v10/user.ts @@ -60,6 +60,12 @@ export interface RESTGetAPICurrentUserGuildsQuery { * @default 200 */ limit?: number; + /** + * Include approximate member and presence counts in response + * + * @default false + */ + with_counts?: boolean; } export interface RESTAPIPartialCurrentUserGuild { @@ -69,6 +75,8 @@ export interface RESTAPIPartialCurrentUserGuild { owner: boolean; features: GuildFeature[]; permissions: Permissions; + approximate_member_count?: number; + approximate_presence_count?: number; } /** diff --git a/deno/rest/v9/user.ts b/deno/rest/v9/user.ts index 3f76888f3..00f698ec6 100644 --- a/deno/rest/v9/user.ts +++ b/deno/rest/v9/user.ts @@ -60,6 +60,12 @@ export interface RESTGetAPICurrentUserGuildsQuery { * @default 200 */ limit?: number; + /** + * Include approximate member and presence counts in response + * + * @default false + */ + with_counts?: boolean; } export interface RESTAPIPartialCurrentUserGuild { @@ -69,6 +75,8 @@ export interface RESTAPIPartialCurrentUserGuild { owner: boolean; features: GuildFeature[]; permissions: Permissions; + approximate_member_count?: number; + approximate_presence_count?: number; } /** diff --git a/payloads/v10/guild.ts b/payloads/v10/guild.ts index 5696f7104..484a0b444 100644 --- a/payloads/v10/guild.ts +++ b/payloads/v10/guild.ts @@ -236,11 +236,13 @@ export interface APIGuild extends APIPartialGuild { */ max_video_channel_users?: number; /** - * **This field is only received from https://discord.com/developers/docs/resources/guild#get-guild with the `with_counts` query parameter set to `true`** + * Approximate number of members in this guild, + * returned from the `GET /guilds/` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true` */ approximate_member_count?: number; /** - * **This field is only received from https://discord.com/developers/docs/resources/guild#get-guild with the `with_counts` query parameter set to `true`** + * Approximate number of non-offline members in this guild, + * returned from the `GET /guilds/` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true` */ approximate_presence_count?: number; /** diff --git a/payloads/v9/guild.ts b/payloads/v9/guild.ts index 38438a007..953c52220 100644 --- a/payloads/v9/guild.ts +++ b/payloads/v9/guild.ts @@ -236,11 +236,13 @@ export interface APIGuild extends APIPartialGuild { */ max_video_channel_users?: number; /** - * **This field is only received from https://discord.com/developers/docs/resources/guild#get-guild with the `with_counts` query parameter set to `true`** + * Approximate number of members in this guild, + * returned from the `GET /guilds/` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true` */ approximate_member_count?: number; /** - * **This field is only received from https://discord.com/developers/docs/resources/guild#get-guild with the `with_counts` query parameter set to `true`** + * Approximate number of non-offline members in this guild, + * returned from the `GET /guilds/` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true` */ approximate_presence_count?: number; /** diff --git a/rest/v10/user.ts b/rest/v10/user.ts index b0590f439..13ffd0f9d 100644 --- a/rest/v10/user.ts +++ b/rest/v10/user.ts @@ -60,6 +60,12 @@ export interface RESTGetAPICurrentUserGuildsQuery { * @default 200 */ limit?: number; + /** + * Include approximate member and presence counts in response + * + * @default false + */ + with_counts?: boolean; } export interface RESTAPIPartialCurrentUserGuild { @@ -69,6 +75,8 @@ export interface RESTAPIPartialCurrentUserGuild { owner: boolean; features: GuildFeature[]; permissions: Permissions; + approximate_member_count?: number; + approximate_presence_count?: number; } /** diff --git a/rest/v9/user.ts b/rest/v9/user.ts index 138d64d94..89924dbf7 100644 --- a/rest/v9/user.ts +++ b/rest/v9/user.ts @@ -60,6 +60,12 @@ export interface RESTGetAPICurrentUserGuildsQuery { * @default 200 */ limit?: number; + /** + * Include approximate member and presence counts in response + * + * @default false + */ + with_counts?: boolean; } export interface RESTAPIPartialCurrentUserGuild { @@ -69,6 +75,8 @@ export interface RESTAPIPartialCurrentUserGuild { owner: boolean; features: GuildFeature[]; permissions: Permissions; + approximate_member_count?: number; + approximate_presence_count?: number; } /**