Skip to content

Add additional audit log key exceptions #6285

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions docs/resources/Audit_Log.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ If no object is noted, there won't be a `changes` array in the entry, though oth

| Event | Value | Description | Object Changed |
| ------------------------------------------- | ----- | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| GUILD_UPDATE | 1 | Server settings were updated | [Guild](#DOCS_RESOURCES_GUILD/guild-object) |
| GUILD_UPDATE | 1 | Server settings were updated | [Guild](#DOCS_RESOURCES_GUILD/guild-object)\* |
| CHANNEL_CREATE | 10 | Channel was created | [Channel](#DOCS_RESOURCES_CHANNEL/channel-object) |
| CHANNEL_UPDATE | 11 | Channel settings were updated | [Channel](#DOCS_RESOURCES_CHANNEL/channel-object) |
| CHANNEL_DELETE | 12 | Channel was deleted | [Channel](#DOCS_RESOURCES_CHANNEL/channel-object) |
Expand Down Expand Up @@ -169,12 +169,13 @@ Some events don't follow the same pattern as other audit log events. Details abo

For most objects, the change keys may be any field on the changed object. The following table details the exceptions to this pattern.

| Object Changed | Change Key Exceptions | Change Object Exceptions |
| ---------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Command Permission](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-permissions-object-application-command-permissions-structure) | snowflake as key | The `changes` array contains objects with a `key` field representing the entity whose command was affected (role, channel, or user ID), a previous permissions object (with an `old_value` key), and an updated permissions object (with a `new_value` key) |
| [Invite](#DOCS_RESOURCES_INVITE/invite-object) and [Invite Metadata](#DOCS_RESOURCES_INVITE/invite-metadata-object) | Additional `channel_id` key (instead of object's `channel.id`) | |
| [Partial Role](#DOCS_TOPICS_PERMISSIONS/role-object) | `$add` and `$remove` as keys | `new_value` is an array of objects that contain the role `id` and `name` |
| [Webhook](#DOCS_RESOURCES_WEBHOOK/webhook-object) | `avatar_hash` key (instead of `avatar`) | |
| Object Changed | Change Key Exceptions | Change Object Exceptions |
| ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Guild](#DOCS_RESOURCES_GUILD/guild-object) | Additional `banner_hash` key (instead of object's `guild.banner`) | |
| [Command Permission](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-permissions-object-application-command-permissions-structure) | snowflake as key | The `changes` array contains objects with a `key` field representing the entity whose command was affected (role, channel, or user ID), a previous permissions object (with an `old_value` key), and an updated permissions object (with a `new_value` key) |
| [Invite](#DOCS_RESOURCES_INVITE/invite-object) and [Invite Metadata](#DOCS_RESOURCES_INVITE/invite-metadata-object) | Additional `channel_id` key and `inviter_id` key (instead of object's `channel.id` and `inviter.id` respectively) | |
| [Partial Role](#DOCS_TOPICS_PERMISSIONS/role-object) | `$add` and `$remove` as keys | `new_value` is an array of objects that contain the role `id` and `name` |
| [Webhook](#DOCS_RESOURCES_WEBHOOK/webhook-object) | `avatar_hash` key (instead of `avatar`) |

## Get Guild Audit Log % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/audit-logs

Expand Down