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

[onboarding] Adds initial docs for Onboarding API #5915

Merged
merged 8 commits into from
Mar 31, 2023
Merged

Conversation

hammerdr
Copy link
Contributor

@hammerdr hammerdr commented Feb 9, 2023

No description provided.

docs/resources/Guild.md Outdated Show resolved Hide resolved
docs/resources/Guild.md Outdated Show resolved Hide resolved
@Victorsitou
Copy link
Contributor

Victorsitou commented Feb 9, 2023

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.
Copy link
Contributor

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?

Copy link
Contributor

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.

@advaith1
Copy link
Contributor

  1. looks like this endpoint returns a 404 unless x-super-properties is set
  2. is there a reason bots cannot edit the onboarding config?
  3. is there a reason /guilds/:id/top-read-channels isn't documented here?

@hammerdr
Copy link
Contributor Author

  1. looks like this endpoint returns a 404 unless x-super-properties is set

Can you elaborate? I just need an Authorization header when testing via curl

Your other questions just aren't covered by this particular PR.

@advaith1
Copy link
Contributor

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

@hammerdr
Copy link
Contributor Author

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.

| 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 |
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
| 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

| 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 |

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?

Copy link
Contributor

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.

Comment on lines 525 to 526


Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Represents the [onboarding](https://support.discord.com/hc/en-us/articles/11074987197975-Community-Onboarding-FAQ) flow for a guild.




###### Prompt Type
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
###### Prompt Type
###### Prompt Types

Comment on lines 565 to 568
| Value | Name |
| ----- | --------------- |
| 0 | Multiple Choice |
| 1 | Dropdown |
Copy link
Contributor

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

Suggested change
| Value | Name |
| ----- | --------------- |
| 0 | Multiple Choice |
| 1 | Dropdown |
| Name | Value |
| --------------- | ----- |
| MULTIPLE_CHOICE | 0 |
| DROPDOWN | 1 |

| 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 |
Copy link
Contributor

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)

Suggested change
| required | boolean | Indicates whether the prompt is required in the onboarding flow |
| required | boolean | Indicates whether the prompt is required in the onboarding flow |


| Field | Type | Description |
| ----------- | -------------------------------------------------- | ----------------------------------------------------------------- |
| id | snowflake | ID of the option |
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
| id | snowflake | ID of the option |
| id | snowflake | ID of the prompt option |

Comment on lines 560 to 562



Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

}
```


Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

| required | boolean | Indicates whether the prompt is required in the onboarding flow |
| in_onboarding | boolean | Indicates whether the prompt is in the onboarding flow |


Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

| default_channel_ids | array of snowflakes | Channel IDs that members get opted into automatically |
| enabled | boolean | Whether onboarding is enabled in the guild |


Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

@Puncher1
Copy link
Contributor

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

docs/resources/Guild.md Outdated Show resolved Hide resolved
Co-authored-by: Florian Spieß <business@minnced.club>
@hammerdr hammerdr merged commit e986a12 into main Mar 31, 2023
@hammerdr hammerdr deleted the onboarding/docs branch March 31, 2023 23:11
@onerandomusername
Copy link
Contributor

So... any plans to document the audit log aspect of onboarding?

DonovanDMC added a commit to OceanicJS/Oceanic that referenced this pull request Apr 2, 2023
KubaZ2 added a commit to NetCordDev/NetCord that referenced this pull request Apr 4, 2023
lukellmann added a commit to kordlib/kord that referenced this pull request Apr 4, 2023
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>
lukellmann added a commit to kordlib/kord that referenced this pull request Apr 4, 2023
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>
vilgotf pushed a commit to twilight-rs/twilight that referenced this pull request Jul 4, 2023
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
mccoderpy added a commit to mccoderpy/discord.py-message-components that referenced this pull request Aug 21, 2023
-> discord/discord-api-docs#5915

Signed-off-by: mccoderpy <mccuber04@outlook.de>
shaydewael added a commit to Jupith/discord-api-docs that referenced this pull request May 14, 2024
Co-authored-by: Shay <shay.dewael@discordapp.com>
Co-authored-by: Florian Spieß <business@minnced.club>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.