Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document with_counts param for GET /users/@me/guilds #5628

Merged
merged 3 commits into from Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/resources/Guild.md
Expand Up @@ -46,8 +46,8 @@ Guilds in Discord represent an isolated collection of users and channels, and ar
| preferred_locale | string | the preferred [locale](#DOCS_REFERENCE/locales) of a Community guild; used in server discovery and notices from Discord, and sent in interactions; defaults to "en-US" |
| public_updates_channel_id | ?snowflake | the id of the channel where admins and moderators of Community guilds receive notices from Discord |
| max_video_channel_users? | integer | the maximum amount of users in a video channel |
| approximate_member_count? | integer | approximate number of members in this guild, returned from the `GET /guilds/<id>` endpoint when `with_counts` is `true` |
| approximate_presence_count? | integer | approximate number of non-offline members in this guild, returned from the `GET /guilds/<id>` endpoint when `with_counts` is `true` |
| approximate_member_count? | integer | 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_presence_count? | integer | 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` |
Copy link
Contributor

Choose a reason for hiding this comment

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

Works on bot tokens too, so I would suggest removing the "(OAuth2)" text from this.

shaydewael marked this conversation as resolved.
Show resolved Hide resolved
| welcome_screen? | [welcome screen](#DOCS_RESOURCES_GUILD/welcome-screen-object) object | the welcome screen of a Community guild, shown to new members, returned in an [Invite](#DOCS_RESOURCES_INVITE/invite-object)'s guild object |
| nsfw_level | integer | [guild NSFW level](#DOCS_RESOURCES_GUILD/guild-object-guild-nsfw-level) |
| stickers? | array of [sticker](#DOCS_RESOURCES_STICKER/sticker-object) objects | custom guild stickers |
Expand Down
15 changes: 9 additions & 6 deletions docs/resources/User.md
Expand Up @@ -176,7 +176,9 @@ Returns a list of partial [guild](#DOCS_RESOURCES_GUILD/guild-object) objects th
"icon": "8342729096ea3675442027381ff50dfe",
"owner": true,
"permissions": "36953089",
"features": ["COMMUNITY", "NEWS"]
"features": ["COMMUNITY", "NEWS"],
"approximate_member_count": 3268,
"approximate_presence_count": 784
}
```

Expand All @@ -185,11 +187,12 @@ Returns a list of partial [guild](#DOCS_RESOURCES_GUILD/guild-object) objects th

###### Query String Params

| Field | Type | Description | Required | Default |
| ------ | --------- | -------------------------------------- | -------- | ------- |
| before | snowflake | get guilds before this guild ID | false | absent |
| after | snowflake | get guilds after this guild ID | false | absent |
| limit | integer | max number of guilds to return (1-200) | false | 200 |
| Field | Type | Description | Required | Default |
| ----------- | --------- | ---------------------------------------------------------- | -------- | ------- |
| before | snowflake | get guilds before this guild ID | false | absent |
| after | snowflake | get guilds after this guild ID | false | absent |
| limit | integer | max number of guilds to return (1-200) | false | 200 |
| with_counts | boolean | include approximate member and presence counts in response | false | false |

## Get Current User Guild Member % GET /users/@me/guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/member

Expand Down