-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Update Invite Docs #6233
Update Invite Docs #6233
Conversation
| max_uses | integer | max number of uses or 0 for unlimited. between 0 and 100 | 0 | | ||
| temporary | boolean | whether this invite only grants temporary membership | false | | ||
| unique | boolean | if true, don't try to reuse a similar invite (useful for creating many unique one time use invites) | false | | ||
| target_type | integer | the [type of target](#DOCS_RESOURCES_INVITE/invite-object-invite-target-types) for this voice channel invite | | | ||
| target_user_id | snowflake | the id of the user whose stream to display for this invite, required if `target_type` is 1, the user must be streaming in the channel | | | ||
| target_application_id | snowflake | the id of the embedded application to open for this invite, required if `target_type` is 2, the application must have the `EMBEDDED` flag | | | ||
|
||
\* If the channel is within a non-community server, the value of `max_age` cannot be 0—it must be between 1 and 2592000. |
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.
"0—it" couldn't / shouldn't that be "0, it"
A bit confused with the wording, might be my german tho :p
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.
It is valid here but could be spaced out from the other words for clarity
\* If the channel is within a non-community server, the value of `max_age` cannot be 0—it must be between 1 and 2592000. | |
\* If the channel is within a non-community server, the value of `max_age` cannot be 0 — it must be between 1 and 2592000. |
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.
This confusion, if any, can be averted by simply removing the superfluous wording.
\* If the channel is within a non-community server, the value of `max_age` cannot be 0—it must be between 1 and 2592000. | |
\* If the channel is within a non-community server, the value of `max_age` must be between 1 and 2592000. |
|
||
You can fetch the `features` array for a specific guild using: | ||
1. The [`GET /guilds/<guild_id>`](#DOCS_RESOURCES_GUILD/get-guild) endpoint, or | ||
2. If you're responding to an interaction, you can reference the new guild partial (`guild`) added to [interaction requests](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object). The interaction guild partial contains the `id`, `locale`, and `features` array for that 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.
Would it be worth noting that the guild field might deprecate the fields it contains similarly to #6051? And possibly even mark these as such in the interaction object below?
Create a new [invite](#DOCS_RESOURCES_INVITE/invite-object) object for the channel. Only usable for guild channels. Requires the `CREATE_INSTANT_INVITE` permission. All JSON parameters for this route are optional, however the request body is not. If you are not sending any fields, you still have to send an empty JSON object (`{}`). Returns an [invite](#DOCS_RESOURCES_INVITE/invite-object) object. Fires an [Invite Create](#DOCS_TOPICS_GATEWAY_EVENTS/invite-create) Gateway event. | ||
Create a new [invite](#DOCS_RESOURCES_INVITE/invite-object) object for the channel. Only usable for guild channels. Requires the `CREATE_INSTANT_INVITE` permission. Returns an [invite](#DOCS_RESOURCES_INVITE/invite-object) object. Fires an [Invite Create](#DOCS_TOPICS_GATEWAY_EVENTS/invite-create) Gateway event. All JSON parameters for this route are optional, however the request body is not. If you are not sending any fields, you still have to send an empty JSON object (`{}`). | ||
|
||
Invites in non-community servers (which don't contain `"COMMUNITY"` in their [`features` array](#DOCS_RESOURCES_GUILD/guild-object)) are limited to 30 days, so `max_age` cannot be set to 0 when creating an invite within them. |
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'm not sure whether stating the limitation for this endpoint twice (thrice if you count the one in the changelog) is really necessary. Maybe an info / warn box would be a better solution here...
| guild? | [partial guild](#DOCS_RESOURCES_GUILD/guild-object) object | Guild that the interaction was sent from | | ||
| guild_id? | snowflake | ID for the guild that the interaction was sent from | | ||
| channel? | [partial channel](#DOCS_RESOURCES_CHANNEL/channel-object) object | Channel that the interaction was sent from | |
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.
| guild? | [partial guild](#DOCS_RESOURCES_GUILD/guild-object) object | Guild that the interaction was sent from | | |
| guild_id? | snowflake | ID for the guild that the interaction was sent from | | |
| channel? | [partial channel](#DOCS_RESOURCES_CHANNEL/channel-object) object | Channel that the interaction was sent from | | |
| guild? | partial [guild](#DOCS_RESOURCES_GUILD/guild-object) object | Guild that the interaction was sent from | | |
| guild_id? | snowflake | ID for the guild that the interaction was sent from | | |
| channel? | partial [channel](#DOCS_RESOURCES_CHANNEL/channel-object) object | Channel that the interaction was sent from | |
Checking with other parts of the docs, "partial" usually isn't masked
Why is this PR still a draft? Are these changes not happening anymore? |
nah we didn't do this. rest in pieces, non-permanent invites for friend servers 🫡 |
Documenting recent behavior change with the update to invites based on their server type. Still finalizing the date in which the deprecation will occur, but it won't be for at least 30 days from the day we announce the date (here and in DDevs api-announcements channel).
This also introduces a new guild partial in interaction replies to make finding the guild's features easier in cases like this.