-
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
Conversation
Will audit log stuff be documented in this PR? |
@@ -1166,6 +1266,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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need any permission?
I doubt it because the client needs to use it when it first joins a server.
|
Can you elaborate? I just need an Authorization header when testing via curl Your other questions just aren't covered by this particular PR. |
The endpoint has a client version number check (probably as part of the experiment gating) so when I fetch it in Postman (using a bot token), it returns {
"message": "404: Not Found",
"code": 0
} unless I include an X-Super-Properties header copied from the client. that seems to still count toward the strict twice-per-minute rate limit though |
I see. I guess my test server is enabled differently and doesn't have this issue. Okay, as far as this API goes, we're going to do a revision to get Emoji to match the shared definition. But it will take some time for that to release. We'll leave this API PR up as reference for the time being, but please consider it pre-alpha and subject to change at any point. |
docs/resources/Guild.md
Outdated
| id | snowflake | the id of the option | | ||
| channel_ids | array of snowflakes | the channels opted into when this option is selected | | ||
| role_ids | array of snowflakes | the roles assigned when this option is selected | | ||
| emoji | [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) object | the emoji of the option | |
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.
| emoji | [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) object | the emoji of the option | | |
| emoji | partial [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) object | the emoji of the option | |
Thank you for keeping the emoji representation consistent <3
docs/resources/Guild.md
Outdated
| id | snowflake | the id of the option | | ||
| channel_ids | array of snowflakes | the channels opted into when this option is selected | | ||
| role_ids | array of snowflakes | the roles assigned when this option is selected | | ||
| emoji | [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) object | the emoji of the option | |
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.
The docs for the emoji structure state that the name
can only be null for reactions. However, when there is no emoji set for a prompt option the emoji
is { "id": null, "name": null, "animated": false }
. Should the docs be updated for the emoji structure to reflect this?
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.
Ideally it should be emoji: null
then instead of a structure filled with nulls; I think that's how it works in other parts of the API too.
docs/resources/Guild.md
Outdated
|
||
|
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.
Represents the [onboarding](https://support.discord.com/hc/en-us/articles/11074987197975-Community-Onboarding-FAQ) flow for a guild. | |
docs/resources/Guild.md
Outdated
|
||
|
||
|
||
###### Prompt Type |
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.
###### Prompt Type | |
###### Prompt Types |
docs/resources/Guild.md
Outdated
| Value | Name | | ||
| ----- | --------------- | | ||
| 0 | Multiple Choice | | ||
| 1 | Dropdown | |
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.
to standardize it with most of the other type tables in docs
| Value | Name | | |
| ----- | --------------- | | |
| 0 | Multiple Choice | | |
| 1 | Dropdown | | |
| Name | Value | | |
| --------------- | ----- | | |
| MULTIPLE_CHOICE | 0 | | |
| DROPDOWN | 1 | |
docs/resources/Guild.md
Outdated
| 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 in the onboarding flow | |
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.
(i think i messed this formatting up when i was editing descriptions oops)
| required | boolean | Indicates whether the prompt is required in the onboarding flow | | |
| required | boolean | Indicates whether the prompt is required in the onboarding flow | |
docs/resources/Guild.md
Outdated
|
||
| Field | Type | Description | | ||
| ----------- | -------------------------------------------------- | ----------------------------------------------------------------- | | ||
| id | snowflake | ID of the option | |
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.
| id | snowflake | ID of the option | | |
| id | snowflake | ID of the prompt option | |
docs/resources/Guild.md
Outdated
|
||
|
||
|
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.
docs/resources/Guild.md
Outdated
} | ||
``` | ||
|
||
|
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.
| required | boolean | Indicates whether the prompt is required in the onboarding flow | | ||
| in_onboarding | boolean | Indicates whether the prompt is in the onboarding flow | | ||
|
||
|
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.
docs/resources/Guild.md
Outdated
| default_channel_ids | array of snowflakes | Channel IDs that members get opted into automatically | | ||
| enabled | boolean | Whether onboarding is enabled in the guild | | ||
|
||
|
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.
A few fields are missing, which I get: "enable_default_channels": true,
"enable_onboarding_prompts": true,
"onboarding_prompts_seen": {},
"onboarding_responses_seen": {},
"responses": [] This would belong to the Onboarding Structure |
Co-authored-by: Florian Spieß <business@minnced.club>
So... any plans to document the audit log aspect of onboarding? |
To get the GuildOnboarding object for a Guild just call guild.getOnboarding(). see discord/discord-api-docs#5915 --------- Co-authored-by: Lukellmann <lukellmann@gmail.com>
To get the GuildOnboarding object for a Guild just call guild.getOnboarding(). see discord/discord-api-docs#5915 --------- Co-authored-by: Lukellmann <lukellmann@gmail.com>
Implements guild onboarding ref: discord/discord-api-docs#5915 This adds the following structures: Onboarding OnboardingPrompt OnboardingPromptOption OnboardingPromptType As well as supporting the http GET for retrieving guild onboarding information. Closes #2134
-> discord/discord-api-docs#5915 Signed-off-by: mccoderpy <mccuber04@outlook.de>
Co-authored-by: Shay <shay.dewael@discordapp.com> Co-authored-by: Florian Spieß <business@minnced.club>
No description provided.