Skip to content

Commit

Permalink
feat(RESTGetAPICurrentUserGuildsQuery): add with_counts (#641)
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidx committed Mar 22, 2023
1 parent 4723d29 commit 0cd9b0d
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 8 deletions.
6 changes: 4 additions & 2 deletions deno/payloads/v10/guild.ts
Expand Up @@ -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/<id>` 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/<id>` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true`
*/
approximate_presence_count?: number;
/**
Expand Down
6 changes: 4 additions & 2 deletions deno/payloads/v9/guild.ts
Expand Up @@ -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/<id>` 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/<id>` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true`
*/
approximate_presence_count?: number;
/**
Expand Down
8 changes: 8 additions & 0 deletions deno/rest/v10/user.ts
Expand Up @@ -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 {
Expand All @@ -69,6 +75,8 @@ export interface RESTAPIPartialCurrentUserGuild {
owner: boolean;
features: GuildFeature[];
permissions: Permissions;
approximate_member_count?: number;
approximate_presence_count?: number;
}

/**
Expand Down
8 changes: 8 additions & 0 deletions deno/rest/v9/user.ts
Expand Up @@ -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 {
Expand All @@ -69,6 +75,8 @@ export interface RESTAPIPartialCurrentUserGuild {
owner: boolean;
features: GuildFeature[];
permissions: Permissions;
approximate_member_count?: number;
approximate_presence_count?: number;
}

/**
Expand Down
6 changes: 4 additions & 2 deletions payloads/v10/guild.ts
Expand Up @@ -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/<id>` 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/<id>` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true`
*/
approximate_presence_count?: number;
/**
Expand Down
6 changes: 4 additions & 2 deletions payloads/v9/guild.ts
Expand Up @@ -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/<id>` 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/<id>` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true`
*/
approximate_presence_count?: number;
/**
Expand Down
8 changes: 8 additions & 0 deletions rest/v10/user.ts
Expand Up @@ -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 {
Expand All @@ -69,6 +75,8 @@ export interface RESTAPIPartialCurrentUserGuild {
owner: boolean;
features: GuildFeature[];
permissions: Permissions;
approximate_member_count?: number;
approximate_presence_count?: number;
}

/**
Expand Down
8 changes: 8 additions & 0 deletions rest/v9/user.ts
Expand Up @@ -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 {
Expand All @@ -69,6 +75,8 @@ export interface RESTAPIPartialCurrentUserGuild {
owner: boolean;
features: GuildFeature[];
permissions: Permissions;
approximate_member_count?: number;
approximate_presence_count?: number;
}

/**
Expand Down

1 comment on commit 0cd9b0d

@vercel
Copy link

@vercel vercel bot commented on 0cd9b0d Mar 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.