diff --git a/docs/resources/Audit_Log.md b/docs/resources/Audit_Log.md index 9521448bc7..3af3907722 100644 --- a/docs/resources/Audit_Log.md +++ b/docs/resources/Audit_Log.md @@ -130,26 +130,29 @@ If no object is noted, there won't be a `changes` array in the entry, though oth | AUTO_MODERATION_USER_COMMUNICATION_DISABLED | 145 | Member was timed out by Auto Moderation | | | CREATOR_MONETIZATION_REQUEST_CREATED | 150 | Creator monetization request was created | | | CREATOR_MONETIZATION_TERMS_ACCEPTED | 151 | Creator monetization terms were accepted | | +| VOICE_CHANNEL_STATUS_UPDATE | 192 | A voice channel status was updated by a user | [Channel](#DOCS_RESOURCES_CHANNEL/channel-object) | +| VOICE_CHANNEL_STATUS_DELETE | 193 | A voice channel status was deleted by a user | [Channel](#DOCS_RESOURCES_CHANNEL/channel-object) | \* Object has exception(s) to available keys. See the [exceptions](#DOCS_RESOURCES_AUDIT_LOG/audit-log-change-object-audit-log-change-exceptions) section below for details. ###### Optional Audit Entry Info -| Field | Type | Description | Event Types | -|-----------------------------------|-----------|------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| application_id | snowflake | ID of the app whose permissions were targeted | APPLICATION_COMMAND_PERMISSION_UPDATE | -| auto_moderation_rule_name | string | Name of the Auto Moderation rule that was triggered | AUTO_MODERATION_BLOCK_MESSAGE & AUTO_MODERATION_FLAG_TO_CHANNEL & AUTO_MODERATION_USER_COMMUNICATION_DISABLED | -| auto_moderation_rule_trigger_type | string | Trigger type of the Auto Moderation rule that was triggered | AUTO_MODERATION_BLOCK_MESSAGE & AUTO_MODERATION_FLAG_TO_CHANNEL & AUTO_MODERATION_USER_COMMUNICATION_DISABLED | -| channel_id | snowflake | Channel in which the entities were targeted | MEMBER_MOVE & MESSAGE_PIN & MESSAGE_UNPIN & MESSAGE_DELETE & STAGE_INSTANCE_CREATE & STAGE_INSTANCE_UPDATE & STAGE_INSTANCE_DELETE & AUTO_MODERATION_BLOCK_MESSAGE & AUTO_MODERATION_FLAG_TO_CHANNEL & AUTO_MODERATION_USER_COMMUNICATION_DISABLED | -| count | string | Number of entities that were targeted | MESSAGE_DELETE & MESSAGE_BULK_DELETE & MEMBER_DISCONNECT & MEMBER_MOVE | -| delete_member_days | string | Number of days after which inactive members were kicked | MEMBER_PRUNE | -| id | snowflake | ID of the overwritten entity | CHANNEL_OVERWRITE_CREATE & CHANNEL_OVERWRITE_UPDATE & CHANNEL_OVERWRITE_DELETE | -| members_removed | string | Number of members removed by the prune | MEMBER_PRUNE | -| message_id | snowflake | ID of the message that was targeted | MESSAGE_PIN & MESSAGE_UNPIN | -| role_name | string | Name of the role if type is `"0"` (not present if type is `"1"`) | CHANNEL_OVERWRITE_CREATE & CHANNEL_OVERWRITE_UPDATE & CHANNEL_OVERWRITE_DELETE | -| type | string | Type of overwritten entity - role (`"0"`) or member (`"1"`) | CHANNEL_OVERWRITE_CREATE & CHANNEL_OVERWRITE_UPDATE & CHANNEL_OVERWRITE_DELETE | -| integration_type | string | The type of integration which performed the action | MEMBER_KICK & MEMBER_ROLE_UPDATE | - +| Field | Type | Description | Event Types | +|-----------------------------------|-----------|------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| application_id | snowflake | ID of the app whose permissions were targeted | APPLICATION_COMMAND_PERMISSION_UPDATE | +| auto_moderation_rule_name | string | Name of the Auto Moderation rule that was triggered | AUTO_MODERATION_BLOCK_MESSAGE & AUTO_MODERATION_FLAG_TO_CHANNEL & AUTO_MODERATION_USER_COMMUNICATION_DISABLED | +| auto_moderation_rule_trigger_type | string | Trigger type of the Auto Moderation rule that was triggered | AUTO_MODERATION_BLOCK_MESSAGE & AUTO_MODERATION_FLAG_TO_CHANNEL & AUTO_MODERATION_USER_COMMUNICATION_DISABLED | +| channel_id | snowflake | Channel in which the entities were targeted | MEMBER_MOVE & MESSAGE_PIN & MESSAGE_UNPIN & MESSAGE_DELETE & STAGE_INSTANCE_CREATE & STAGE_INSTANCE_UPDATE & STAGE_INSTANCE_DELETE & AUTO_MODERATION_BLOCK_MESSAGE & AUTO_MODERATION_FLAG_TO_CHANNEL & AUTO_MODERATION_USER_COMMUNICATION_DISABLED & VOICE_CHANNEL_STATUS_UPDATE & VOICE_CHANNEL_STATUS_DELETE | +| count | string | Number of entities that were targeted | MESSAGE_DELETE & MESSAGE_BULK_DELETE & MEMBER_DISCONNECT & MEMBER_MOVE | +| delete_member_days | string | Number of days after which inactive members were kicked | MEMBER_PRUNE | +| id | snowflake | ID of the overwritten entity | CHANNEL_OVERWRITE_CREATE & CHANNEL_OVERWRITE_UPDATE & CHANNEL_OVERWRITE_DELETE | +| members_removed | string | Number of members removed by the prune | MEMBER_PRUNE | +| message_id | snowflake | ID of the message that was targeted | MESSAGE_PIN & MESSAGE_UNPIN | +| role_name | string | Name of the role if type is `"0"` (not present if type is `"1"`) | CHANNEL_OVERWRITE_CREATE & CHANNEL_OVERWRITE_UPDATE & CHANNEL_OVERWRITE_DELETE | +| type | string | Type of overwritten entity - role (`"0"`) or member (`"1"`) | CHANNEL_OVERWRITE_CREATE & CHANNEL_OVERWRITE_UPDATE & CHANNEL_OVERWRITE_DELETE | +| integration_type | string | The type of integration which performed the action | MEMBER_KICK & MEMBER_ROLE_UPDATE | +| status | string | The new voice channel status | VOICE_CHANNEL_STATUS_UPDATE | + ### Audit Log Change Object Many audit log events include a `changes` array in their [entry object](#DOCS_RESOURCES_AUDIT_LOG/audit-log-entry-object-audit-log-entry-structure). The [structure for the individual changes](#DOCS_RESOURCES_AUDIT_LOG/audit-log-change-object-audit-log-change-structure) varies based on the event type and its changed objects, so apps shouldn't depend on a single pattern of handling audit log events. diff --git a/docs/resources/Channel.md b/docs/resources/Channel.md index 661a87faf8..5a33ec6f94 100644 --- a/docs/resources/Channel.md +++ b/docs/resources/Channel.md @@ -15,6 +15,7 @@ Represents a guild or DM channel within Discord. | permission_overwrites? | array of [overwrite](#DOCS_RESOURCES_CHANNEL/overwrite-object) objects | explicit permission overwrites for members and roles | | name? | ?string | the name of the channel (1-100 characters) | | topic? | ?string | the channel topic (0-4096 characters for `GUILD_FORUM` and `GUILD_MEDIA` channels, 0-1024 characters for all others) | +| status? | ?string | the voice channel status (0-500 characters) | | nsfw? | boolean | whether the channel is nsfw | | last_message_id? | ?snowflake | the id of the last message sent in this channel (or thread for `GUILD_FORUM` or `GUILD_MEDIA` channels) (may not point to an existing or valid message or thread) | | bitrate? | integer | the bitrate (in bits) of the voice channel | diff --git a/docs/topics/Gateway_Events.md b/docs/topics/Gateway_Events.md index 3258379b17..b61e8a2784 100644 --- a/docs/topics/Gateway_Events.md +++ b/docs/topics/Gateway_Events.md @@ -469,14 +469,27 @@ Sent when a new guild channel is created, relevant to the current user. The inne #### Channel Update -Sent when a channel is updated. The inner payload is a [channel](#DOCS_RESOURCES_CHANNEL/channel-object) object. This is not sent when the field `last_message_id` is altered. To keep track of the last_message_id changes, you must listen for [Message Create](#DOCS_TOPICS_GATEWAY_EVENTS/message-create) events (or [Thread Create](#DOCS_TOPICS_GATEWAY_EVENTS/thread-create) events for `GUILD_FORUM` and `GUILD_MEDIA` channels). +Sent when a channel is updated. The inner payload is a [channel](#DOCS_RESOURCES_CHANNEL/channel-object) object. This is not sent when the `status` or `last_message_id` field changes. To keep track of the last_message_id changes, you must listen for [Message Create](#DOCS_TOPICS_GATEWAY_EVENTS/message-create) events (or [Thread Create](#DOCS_TOPICS_GATEWAY_EVENTS/thread-create) events for `GUILD_FORUM` and `GUILD_MEDIA` channels). This event may reference roles or guild members that no longer exist in the guild. +> info +> When the `status` field changes a [Voice Channel Status Update](#DOCS_TOPICS_GATEWAY_EVENTS/voice-channel-status-update) event is sent instead. + #### Channel Delete Sent when a channel relevant to the current user is deleted. The inner payload is a [channel](#DOCS_RESOURCES_CHANNEL/channel-object) object. +#### Voice Channel Status Update + +Sent when the voice channel status changes. + +| Field | Type | Description | +|----------|-----------|------------------------------| +| id | snowflake | The channel id | +| guild_id | snowflake | The guild id | +| status | ?string | The new voice channel status | + #### Thread Create Sent when a thread is created, relevant to the current user, or when the current user is added to a thread. The inner payload is a [channel](#DOCS_RESOURCES_CHANNEL/channel-object) object. diff --git a/docs/topics/Permissions.md b/docs/topics/Permissions.md index 80bacd8b55..52703c14e8 100644 --- a/docs/topics/Permissions.md +++ b/docs/topics/Permissions.md @@ -77,6 +77,7 @@ Below is a table of all current permissions, their integer values in hexadecimal | USE_SOUNDBOARD | `0x0000040000000000` `(1 << 42)` | Allows for using soundboard in a voice channel | V | | USE_EXTERNAL_SOUNDS | `0x0000200000000000` `(1 << 45)` | Allows the usage of custom soundboard sounds from other servers | V | | SEND_VOICE_MESSAGES | `0x0000400000000000` `(1 << 46)` | Allows sending voice messages | T, V, S | +| SET_VOICE_CHANNEL_STATUS | `0x0001000000000000` `(1 << 48)` | Allows setting voice channel status | V | **\* These permissions require the owner account to use [two-factor authentication](#DOCS_TOPICS_OAUTH2/twofactor-authentication-requirement) when used on a guild that has server-wide 2FA enabled.**