-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[onboarding] Adds initial docs for Onboarding API #5915
Changes from 5 commits
6d3b804
776a2a7
d7d4d5b
82b0efd
7415681
44ff865
7480f07
8e8f1bc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -521,6 +521,112 @@ A partial [guild](#DOCS_RESOURCES_GUILD/guild-object) object. Represents an Offl | |||||||||||||||||
} | ||||||||||||||||||
``` | ||||||||||||||||||
|
||||||||||||||||||
### Guild Onboarding Object | ||||||||||||||||||
|
||||||||||||||||||
|
||||||||||||||||||
###### Guild Onboarding Structure | ||||||||||||||||||
|
||||||||||||||||||
| Field | Type | Description | | ||||||||||||||||||
| ------------------- | --------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | | ||||||||||||||||||
| guild_id | snowflake | ID of the guild this onboarding is part of | | ||||||||||||||||||
| prompts | array of [onboarding prompt](#DOCS_RESOURCES_GUILD/guild-onboarding-object-onboarding-prompt-structure) objects | Prompts shown during onboarding and in customize community | | ||||||||||||||||||
| default_channel_ids | array of snowflakes | Channel IDs that members get opted into automatically | | ||||||||||||||||||
shaydewael marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||
| enabled | boolean | Whether onboarding is enabled in the guild | | ||||||||||||||||||
|
||||||||||||||||||
|
||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
###### Onboarding Prompt Structure | ||||||||||||||||||
|
||||||||||||||||||
| Field | Type | Description | | ||||||||||||||||||
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | ||||||||||||||||||
| id | snowflake | ID of the prompt | | ||||||||||||||||||
| type | [prompt type](#DOCS_RESOURCES_GUILD/guild-onboarding-object-prompt-type) | Type of prompt | | ||||||||||||||||||
| options | array of [prompt option](#DOCS_RESOURCES_GUILD/guild-onboarding-object-prompt-option-structure) objects | Options available within the prompt | | ||||||||||||||||||
| title | string | Title of the prompt | | ||||||||||||||||||
| single_select | boolean | Indicates whether users are limited to selecting one option for the prompt | | ||||||||||||||||||
| required | boolean | Indicates whether the prompt is required before a user completes the onboarding flow | | ||||||||||||||||||
| in_onboarding | boolean | Indicates whether the prompt is present in the onboarding flow. If `false`, the prompt will only appear in the Channels & Roles tab | | ||||||||||||||||||
|
||||||||||||||||||
|
||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
###### Prompt Option Structure | ||||||||||||||||||
|
||||||||||||||||||
| Field | Type | Description | | ||||||||||||||||||
| ----------- | -------------------------------------------------- | ----------------------------------------------------------------- | | ||||||||||||||||||
| id | snowflake | ID of the option | | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
| channel_ids | array of snowflakes | IDs for channels a member is added to when the option is selected | | ||||||||||||||||||
| role_ids | array of snowflakes | IDs for roles assigned to a member when the option is selected | | ||||||||||||||||||
| emoji | [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) object | Emoji of the option | | ||||||||||||||||||
| title | string | Title of the option | | ||||||||||||||||||
| description | ?string | Description of the option | | ||||||||||||||||||
|
||||||||||||||||||
|
||||||||||||||||||
|
||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
###### Prompt Type | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
|
||||||||||||||||||
| Value | Name | | ||||||||||||||||||
| ----- | --------------- | | ||||||||||||||||||
| 0 | Multiple Choice | | ||||||||||||||||||
| 1 | Dropdown | | ||||||||||||||||||
hammerdr marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. to standardize it with most of the other type tables in docs
Suggested change
|
||||||||||||||||||
|
||||||||||||||||||
|
||||||||||||||||||
###### Example Guild Onboarding | ||||||||||||||||||
|
||||||||||||||||||
```json | ||||||||||||||||||
{ | ||||||||||||||||||
"guild_id": "960007075288915998", | ||||||||||||||||||
"prompts": [ | ||||||||||||||||||
{ | ||||||||||||||||||
"id": "1067461047608422473", | ||||||||||||||||||
"title": "What do you want to do in this community?", | ||||||||||||||||||
"options": [ | ||||||||||||||||||
{ | ||||||||||||||||||
"id": "1067461047608422476", | ||||||||||||||||||
"title": "Chat with Friends", | ||||||||||||||||||
"description": "", | ||||||||||||||||||
"emoji": { | ||||||||||||||||||
"id": "1070002302032826408", | ||||||||||||||||||
"name": "chat", | ||||||||||||||||||
"animated": false | ||||||||||||||||||
}, | ||||||||||||||||||
"role_ids": [], | ||||||||||||||||||
"channel_ids": [ | ||||||||||||||||||
"962007075288916001" | ||||||||||||||||||
] | ||||||||||||||||||
}, | ||||||||||||||||||
{ | ||||||||||||||||||
"id": "1070004843541954678", | ||||||||||||||||||
"title": "Get Gud", | ||||||||||||||||||
"description": "We have excellent teachers!", | ||||||||||||||||||
"emoji": { | ||||||||||||||||||
"id": null, | ||||||||||||||||||
"name": "😀", | ||||||||||||||||||
"animated": false | ||||||||||||||||||
}, | ||||||||||||||||||
"role_ids": [ | ||||||||||||||||||
"982014491980083211" | ||||||||||||||||||
], | ||||||||||||||||||
"channel_ids": [] | ||||||||||||||||||
}, | ||||||||||||||||||
], | ||||||||||||||||||
"single_select": false, | ||||||||||||||||||
"required": false, | ||||||||||||||||||
"in_onboarding": true, | ||||||||||||||||||
"type": 0 | ||||||||||||||||||
}, | ||||||||||||||||||
], | ||||||||||||||||||
"default_channel_ids": [ | ||||||||||||||||||
"998678771706110023", | ||||||||||||||||||
"998678693058719784", | ||||||||||||||||||
"1070008122577518632", | ||||||||||||||||||
"998678764340912138", | ||||||||||||||||||
"998678704446263309", | ||||||||||||||||||
"998678683592171602", | ||||||||||||||||||
"998678699715067986" | ||||||||||||||||||
], | ||||||||||||||||||
"enabled": true, | ||||||||||||||||||
} | ||||||||||||||||||
``` | ||||||||||||||||||
|
||||||||||||||||||
|
||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
### Membership Screening Object | ||||||||||||||||||
|
||||||||||||||||||
In guilds with [Membership Screening](https://support.discord.com/hc/en-us/articles/1500000466882) enabled, when a member joins, [Guild Member Add](#DOCS_TOPICS_GATEWAY_EVENTS/guild-member-add) will be emitted but they will initially be restricted from doing any actions in the guild, and `pending` will be true in the [member object](#DOCS_RESOURCES_GUILD/guild-member-object). When the member completes the screening, [Guild Member Update](#DOCS_TOPICS_GATEWAY_EVENTS/guild-member-update) will be emitted and `pending` will be false. | ||||||||||||||||||
|
@@ -1166,6 +1272,10 @@ Modify the guild's [Welcome Screen](#DOCS_RESOURCES_GUILD/welcome-screen-object) | |||||||||||||||||
| welcome_channels | array of [welcome screen channel](#DOCS_RESOURCES_GUILD/welcome-screen-object-welcome-screen-channel-structure) objects | channels linked in the welcome screen and their display options | | ||||||||||||||||||
| description | string | the server description to show in the welcome screen | | ||||||||||||||||||
|
||||||||||||||||||
## Get Guild Onboarding % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/onboarding | ||||||||||||||||||
|
||||||||||||||||||
Returns the [Onboarding](#DOCS_RESOURCES_GUILD/guild-onboarding-object) object for the guild. | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this need any permission? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I doubt it because the client needs to use it when it first joins a server. |
||||||||||||||||||
|
||||||||||||||||||
## Modify Current User Voice State % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/voice-states/@me | ||||||||||||||||||
|
||||||||||||||||||
Updates the current user's voice state. Returns `204 No Content` on success. Fires a [Voice State Update](#DOCS_TOPICS_GATEWAY_EVENTS/voice-state-update) Gateway event. | ||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.