Skip to content

Commit 3bd60ee

Browse files
elenakrittiksplatterxladvaith1
authored
feat(invite): Guest invites (#6247)
* feat(invite): Guest invites * Apply suggestion Co-authored-by: Ruairi O hUanachain <[email protected]> * update flags docs * fix link * actually fix ci this time --------- Co-authored-by: Ruairi O hUanachain <[email protected]> Co-authored-by: advaith <[email protected]>
1 parent 8d380d0 commit 3bd60ee

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

docs/resources/guild.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ Fields specific to the `GUILD_CREATE` event are listed in the [Gateway Events do
159159
| VERIFIED | guild is verified |
160160
| VIP_REGIONS | guild has access to set 384kbps bitrate in voice (previously VIP voice servers) |
161161
| WELCOME_SCREEN_ENABLED | guild has enabled the welcome screen |
162+
| GUESTS_ENABLED | guild has access to guest invites |
162163
| ENHANCED_ROLE_COLORS | guild is able to set gradient colors to roles |
163164

164165
###### Mutable Guild Features
@@ -359,7 +360,7 @@ The fields `id`, `discriminator` and `avatar` are anonymized to prevent abuse.
359360
| avatar? | ?string | the member's [guild avatar hash](/docs/reference#image-formatting) |
360361
| banner? | ?string | the member's [guild banner hash](/docs/reference#image-formatting) |
361362
| roles | array of snowflakes | array of [role](/docs/topics/permissions#role-object) object ids |
362-
| joined_at | ISO8601 timestamp | when the user joined the guild |
363+
| joined_at | ?ISO8601 timestamp | when the user joined the guild |
363364
| premium_since? | ?ISO8601 timestamp | when the user started [boosting](https://support.discord.com/hc/en-us/articles/360028038352-Server-Boosting-) the guild |
364365
| deaf | boolean | whether the user is deafened in voice channels |
365366
| mute | boolean | whether the user is muted in voice channels |
@@ -377,6 +378,9 @@ The field `user` won't be included in the member object attached to `MESSAGE_CRE
377378
In `GUILD_` events, `pending` will always be included as true or false. In non `GUILD_` events which can only be triggered by non-`pending` users, `pending` will not be included.
378379
:::
379380

381+
> info
382+
> Member objects retrieved from `VOICE_STATE_UPDATE` events will have `joined_at` set as `null` if the member was invited as a guest.
383+
380384
###### Example Guild Member
381385

382386
```json
@@ -1511,4 +1515,4 @@ Both `invites_disabled_until` and `dms_disabled_until` can be enabled for a maxi
15111515
| invites_disabled_until? | ?ISO8601 timestamp \* | when invites will be enabled again |
15121516
| dms_disabled_until? | ?ISO8601 timestamp \* | when direct messages will be enabled again |
15131517

1514-
\* Supplying `null` disables the action.
1518+
\* Supplying `null` disables the action.

docs/resources/invite.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Represents a code that when used, adds a user to a guild or group DM channel.
2525
| expires_at? | ?ISO8601 timestamp | the expiration date of this invite, returned from the `GET /invites/<code>` endpoint when `with_expiration` is `true` |
2626
| stage_instance? | [invite stage instance](/docs/resources/invite#invite-stage-instance-object) object | stage instance data if there is a [public Stage instance](/docs/resources/stage-instance) in the Stage channel this invite is for (deprecated) |
2727
| guild_scheduled_event? | [guild scheduled event](/docs/resources/guild-scheduled-event#guild-scheduled-event-object) object | guild scheduled event data, only included if `guild_scheduled_event_id` contains a valid guild scheduled event id |
28+
| flags? | integer | [guild invite flags](/docs/resources/invite#invite-object-guild-invite-flags) for guild invites |
2829

2930
###### Invite Types
3031

@@ -41,6 +42,12 @@ Represents a code that when used, adds a user to a guild or group DM channel.
4142
| STREAM | 1 |
4243
| EMBEDDED_APPLICATION | 2 |
4344

45+
###### Guild Invite Flags
46+
47+
| Flag | Value | Description |
48+
|-----------------|----------|---------------------------------------------------|
49+
| IS_GUEST_INVITE | `1 << 0` | this invite is a guest invite for a voice channel |
50+
4451
###### Example Invite Object
4552

4653
```json

0 commit comments

Comments
 (0)