Skip to content

Commit aa76e54

Browse files
committed
document incident actions
1 parent 9f91ba1 commit aa76e54

File tree

1 file changed

+85
-5
lines changed

1 file changed

+85
-5
lines changed

docs/resources/Guild.md

Lines changed: 85 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ Guilds in Discord represent an isolated collection of users and channels, and ar
5454
| stickers? | array of [sticker](#DOCS_RESOURCES_STICKER/sticker-object) objects | custom guild stickers |
5555
| premium_progress_bar_enabled | boolean | whether the guild has the boost progress bar enabled |
5656
| safety_alerts_channel_id | ?snowflake | the id of the channel where admins and moderators of Community guilds receive safety alerts from Discord |
57+
| incidents_data | ?[incidents data](#DOCS_RESOURCES_GUILD/incidents-data-object) object | the incidents data for this guild |
5758

5859
\* These fields are only sent when using the [GET Current User Guilds](#DOCS_RESOURCES_USER/get-current-user-guilds) endpoint and are relative to the requested user
5960

@@ -651,6 +652,26 @@ In guilds with [Membership Screening](https://support.discord.com/hc/en-us/artic
651652
> warn
652653
> We are making significant changes to the Membership Screening API specifically related to getting and editing the Membership Screening object. Long story short is that it can be improved. As such, we have removed those documentation. There will **not be** any changes to how pending members work, as outlined above. That behavior will stay the same.
653654
655+
### Incidents Data Object
656+
657+
###### Incidents Data Structure
658+
659+
| Field | Type | Description |
660+
|------------------------|--------------------|----------------------------------------|
661+
| invites_disabled_until | ?ISO8601 timestamp | when invites get enabled again |
662+
| dms_disabled_until | ?ISO8601 timestamp | when direct messages get enabled again |
663+
| dm_spam_detected_at | ?ISO8601 timestamp | when the dm spam was detected at |
664+
| raid_detected_at | ?ISO8601 timestamp | when the raid was detected at |
665+
666+
###### Example Incidents Data
667+
668+
```json
669+
{
670+
"invites_disabled_until": "2023-09-01T14:48:02.222000+00:00",
671+
"dms_disabled_until": null
672+
}
673+
```
674+
654675
## Create Guild % POST /guilds
655676

656677
Create a new guild. Returns a [guild](#DOCS_RESOURCES_GUILD/guild-object) object on success. Fires a [Guild Create](#DOCS_TOPICS_GATEWAY_EVENTS/guild-create) Gateway event.
@@ -1050,11 +1071,11 @@ Returns a list of [ban](#DOCS_RESOURCES_GUILD/ban-object) objects for the users
10501071

10511072
###### Query String Params
10521073

1053-
| Field | Type | Description | Default |
1054-
|-----------|-----------|------------------------------------------------|---------|
1055-
| limit? | number | number of users to return (up to maximum 1000) | 1000 |
1056-
| before? * | snowflake | consider only users before given user id | null |
1057-
| after? * | snowflake | consider only users after given user id | null |
1074+
| Field | Type | Description | Default |
1075+
|------------|-----------|------------------------------------------------|---------|
1076+
| limit? | number | number of users to return (up to maximum 1000) | 1000 |
1077+
| before? \* | snowflake | consider only users before given user id | null |
1078+
| after? \* | snowflake | consider only users after given user id | null |
10581079

10591080
\* Provide a user id to `before` and `after` for pagination. Users will always be returned in ascending order by `user.id`. If both `before` and `after` are provided, only `before` is respected.
10601081

@@ -1342,3 +1363,62 @@ Modifies the onboarding configuration of the guild. Returns a 200 with the [Onbo
13421363
| default_channel_ids | array of snowflakes | Channel IDs that members get opted into automatically |
13431364
| enabled | boolean | Whether onboarding is enabled in the guild |
13441365
| mode | [onboarding mode](#DOCS_RESOURCES_GUILD/guild-onboarding-object-onboarding-mode) | Current mode of onboarding |
1366+
1367+
## Modify Current User Voice State % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/voice-states/@me
1368+
1369+
Updates the current user's voice state. Returns `204 No Content` on success. Fires a [Voice State Update](#DOCS_TOPICS_GATEWAY_EVENTS/voice-state-update) Gateway event.
1370+
1371+
###### JSON Params
1372+
1373+
| Field | Type | Description |
1374+
|-----------------------------|--------------------|------------------------------------------------|
1375+
| channel_id? | snowflake | the id of the channel the user is currently in |
1376+
| suppress? | boolean | toggles the user's suppress state |
1377+
| request_to_speak_timestamp? | ?ISO8601 timestamp | sets the user's request to speak |
1378+
1379+
###### Caveats
1380+
1381+
There are currently several caveats for this endpoint:
1382+
1383+
- `channel_id` must currently point to a stage channel.
1384+
- current user must already have joined `channel_id`.
1385+
- You must have the `MUTE_MEMBERS` permission to unsuppress yourself. You can always suppress yourself.
1386+
- You must have the `REQUEST_TO_SPEAK` permission to request to speak. You can always clear your own request to speak.
1387+
- You are able to set `request_to_speak_timestamp` to any present or future time.
1388+
1389+
## Modify User Voice State % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/voice-states/{user.id#DOCS_RESOURCES_USER/user-object}
1390+
1391+
Updates another user's voice state. Fires a [Voice State Update](#DOCS_TOPICS_GATEWAY_EVENTS/voice-state-update) Gateway event.
1392+
1393+
###### JSON Params
1394+
1395+
| Field | Type | Description |
1396+
|------------|-----------|------------------------------------------------|
1397+
| channel_id | snowflake | the id of the channel the user is currently in |
1398+
| suppress? | boolean | toggles the user's suppress state |
1399+
1400+
###### Caveats
1401+
1402+
There are currently several caveats for this endpoint:
1403+
1404+
- `channel_id` must currently point to a stage channel.
1405+
- User must already have joined `channel_id`.
1406+
- You must have the `MUTE_MEMBERS` permission. (Since suppression is the only thing that is available currently.)
1407+
- When unsuppressed, non-bot users will have their `request_to_speak_timestamp` set to the current time. Bot users will not.
1408+
- When suppressed, the user will have their `request_to_speak_timestamp` removed.
1409+
1410+
## Modify Guild Incident Actions % PUT /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/incident-actions
1411+
1412+
Modifies the incident actions of the guild. Returns a 200 with the [Incidents Data](#DOCS_RESOURCES_GUILD/incidents-data-object) object for the guild. Requires the `MANAGE_GUILD` permission.
1413+
1414+
###### JSON Params
1415+
1416+
> info
1417+
> Both `invites_disabled_until` and `dms_disabled_until` can be disabled for a maximal timespan of 24 hours in the future.
1418+
1419+
| Field | Type | Description |
1420+
|-------------------------|-----------------------|----------------------------------------------|
1421+
| invites_disabled_until? | ?ISO8601 timestamp \* | when invites should be enabled again |
1422+
| dms_disabled_until? | ?ISO8601 timestamp \* | when direct messages should be enabled again |
1423+
1424+
\* Supplying `null` disables the action.

0 commit comments

Comments
 (0)