diff --git a/docs/resources/Channel.md b/docs/resources/Channel.md index 40471ac844..3f972b40ad 100644 --- a/docs/resources/Channel.md +++ b/docs/resources/Channel.md @@ -965,14 +965,15 @@ Create a new [invite](#DOCS_RESOURCES_INVITE/invite-object) object for the chann ###### JSON Params -| Field | Type | Description | Default | -| ----------------- | ------- | --------------------------------------------------------------------------------------------------- | ---------------- | -| max_age | integer | duration of invite in seconds before expiry, or 0 for never. between 0 and 604800 (7 days) | 86400 (24 hours) | -| 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_user_id? | string | the target user id for this invite | | -| target_user_type? | integer | the [type of user target](#DOCS_RESOURCES_INVITE/invite-object-target-user-types) for this invite | | +| Field | Type | Description | Default | +|-----------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------|------------------| +| max_age | integer | duration of invite in seconds before expiry, or 0 for never. between 0 and 604800 (7 days) | 86400 (24 hours) | +| 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 | | ## Delete Channel Permission % DELETE /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/permissions/{overwrite.id#DOCS_RESOURCES_CHANNEL/overwrite-object} diff --git a/docs/resources/Invite.md b/docs/resources/Invite.md index cc63d8a9b1..f1b6992cc4 100644 --- a/docs/resources/Invite.md +++ b/docs/resources/Invite.md @@ -6,22 +6,24 @@ Represents a code that when used, adds a user to a guild or group DM channel. ###### Invite Structure -| Field | Type | Description | -| --------------------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| code | string | the invite code (unique ID) | -| guild? | partial [guild](#DOCS_RESOURCES_GUILD/guild-object) object | the guild this invite is for | -| channel | partial [channel](#DOCS_RESOURCES_CHANNEL/channel-object) object | the channel this invite is for | -| inviter? | [user](#DOCS_RESOURCES_USER/user-object) object | the user who created the invite | -| target_user? | partial [user](#DOCS_RESOURCES_USER/user-object) object | the target user for this invite | -| target_user_type? | integer | the [type of user target](#DOCS_RESOURCES_INVITE/invite-object-target-user-types) for this invite | -| approximate_presence_count? | integer | approximate count of online members (only present when target_user is set) | -| approximate_member_count? | integer | approximate count of total members | - -###### Target User Types - -| Type | Value | -| ------ | ----- | -| STREAM | 1 | +| Field | Type | Description | +|-----------------------------|------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------| +| code | string | the invite code (unique ID) | +| guild? | partial [guild](#DOCS_RESOURCES_GUILD/guild-object) object | the guild this invite is for | +| channel | partial [channel](#DOCS_RESOURCES_CHANNEL/channel-object) object | the channel this invite is for | +| inviter? | [user](#DOCS_RESOURCES_USER/user-object) object | the user who created the invite | +| target_type? | integer | the [type of target](#DOCS_RESOURCES_INVITE/invite-object-invite-target-types) for this voice channel invite | +| target_user? | [user](#DOCS_RESOURCES_USER/user-object) object | the user whose stream to display for this voice channel stream invite | +| target_application? | partial [application](#DOCS_TOPICS_OAUTH2/application) object | the embedded application to open for this voice channel embedded application invite | +| approximate_presence_count? | integer | approximate count of online members, returned from the `GET /invites/` endpoint when `with_counts` is `true` | +| approximate_member_count? | integer | approximate count of total members, returned from the `GET /invites/` endpoint when `with_counts` is `true` | + +###### Invite Target Types + +| Type | Value | +|----------------------|-------| +| STREAM | 1 | +| EMBEDDED_APPLICATION | 2 | ###### Example Invite Object @@ -51,14 +53,14 @@ Represents a code that when used, adds a user to a guild or group DM channel. "discriminator": "7653", "public_flags": 131328 }, + "target_type": 1, "target_user": { "id": "165176875973476352", "username": "bob", "avatar": "deadbeef", "discriminator": "1234", "public_flags": 64 - }, - "target_user_type": 1 + } } ``` diff --git a/docs/topics/Gateway.md b/docs/topics/Gateway.md index 7e34fcbf0f..a583b01946 100644 --- a/docs/topics/Gateway.md +++ b/docs/topics/Gateway.md @@ -1005,19 +1005,20 @@ Sent when a new invite to a channel is created. ###### Invite Create Event Fields -| Field | Type | Description | -|-------------------|---------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------| -| channel_id | snowflake | the channel the invite is for | -| code | string | the unique invite [code](#DOCS_RESOURCES_INVITE/invite-object) | -| created_at | timestamp | the time at which the invite was created | -| guild_id? | snowflake | the guild of the invite | -| inviter? | [user](#DOCS_RESOURCES_USER/user-object) object | the user that created the invite | -| max_age | integer | how long the invite is valid for (in seconds) | -| max_uses | integer | the maximum number of times the invite can be used | -| target_user? | partial [user](#DOCS_RESOURCES_USER/user-object) object | the target user for this invite | -| target_user_type? | integer | the [type of user target](#DOCS_RESOURCES_INVITE/invite-object-target-user-types) for this invite | -| temporary | boolean | whether or not the invite is temporary (invited users will be kicked on disconnect unless they're assigned a role) | -| uses | integer | how many times the invite has been used (always will be 0) | +| Field | Type | Description | +|---------------------|----------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------| +| channel_id | snowflake | the channel the invite is for | +| code | string | the unique invite [code](#DOCS_RESOURCES_INVITE/invite-object) | +| created_at | timestamp | the time at which the invite was created | +| guild_id? | snowflake | the guild of the invite | +| inviter? | [user](#DOCS_RESOURCES_USER/user-object) object | the user that created the invite | +| max_age | integer | how long the invite is valid for (in seconds) | +| max_uses | integer | the maximum number of times the invite can be used | +| target_type? | integer | the [type of target](#DOCS_RESOURCES_INVITE/invite-object-invite-target-types) for this voice channel invite | +| target_user? | [user](#DOCS_RESOURCES_USER/user-object) object | the user whose stream to display for this voice channel stream invite | +| target_application? | partial [application](#DOCS_TOPICS_OAUTH2/application-object) object | the embedded application to open for this voice channel embedded application invite | +| temporary | boolean | whether or not the invite is temporary (invited users will be kicked on disconnect unless they're assigned a role) | +| uses | integer | how many times the invite has been used (always will be 0) | ### Invite Delete