Skip to content
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

Add GUILD_AUDIT_LOG_ENTRY_CREATE event #5849

Merged
merged 6 commits into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions docs/Change_Log.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## Guild Audit Log Events

#### Jan 18, 2023

At long last, a new [`GUILD_AUDIT_LOG_ENTRY_CREATE`](#DOCS_TOPICS_GATEWAY_EVENTS/guild-audit-log-entry-create) event has been added to the gateway, allowing your application to react to moderation actions in guilds. The `VIEW_AUDIT_LOG` permission is required in order to receive these events, and the [`GUILD_MODERATION` intent](#DOCS_TOPICS_GATEWAY/gateway-intents) needs to be set when connecting to the gateway.

## Thread Member Details and Pagination

> danger
Expand Down
3 changes: 2 additions & 1 deletion docs/topics/Gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@ GUILD_MEMBERS (1 << 1) **
- GUILD_MEMBER_REMOVE
- THREAD_MEMBERS_UPDATE *

GUILD_BANS (1 << 2)
GUILD_MODERATION (1 << 2)
- GUILD_AUDIT_LOG_ENTRY_CREATE
- GUILD_BAN_ADD
- GUILD_BAN_REMOVE

Expand Down
5 changes: 5 additions & 0 deletions docs/topics/Gateway_Events.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ Receive events are Gateway events encapsulated in an [event payload](#DOCS_TOPIC
| [Guild Create](#DOCS_TOPICS_GATEWAY_EVENTS/guild-create) | Lazy-load for unavailable guild, guild became available, or user joined a new guild |
| [Guild Update](#DOCS_TOPICS_GATEWAY_EVENTS/guild-update) | Guild was updated |
| [Guild Delete](#DOCS_TOPICS_GATEWAY_EVENTS/guild-delete) | Guild became unavailable, or user left/was removed from a guild |
| [Guild Audit Log Entry Create](#DOCS_TOPICS_GATEWAY_EVENTS/guild-audit-log-entry-create) | A guild audit log entry was created |
| [Guild Ban Add](#DOCS_TOPICS_GATEWAY_EVENTS/guild-ban-add) | User was banned from a guild |
| [Guild Ban Remove](#DOCS_TOPICS_GATEWAY_EVENTS/guild-ban-remove) | User was unbanned from a guild |
| [Guild Emojis Update](#DOCS_TOPICS_GATEWAY_EVENTS/guild-emojis-update) | Guild emojis were updated |
Expand Down Expand Up @@ -586,6 +587,10 @@ Sent when a guild is updated. The inner payload is a [guild](#DOCS_RESOURCES_GUI

Sent when a guild becomes or was already unavailable due to an outage, or when the user leaves or is removed from a guild. The inner payload is an [unavailable guild](#DOCS_RESOURCES_GUILD/unavailable-guild-object) object. If the `unavailable` field is not set, the user was removed from the guild.

#### Guild Audit Log Entry Create

Sent when a guild audit log entry is created. The inner payload is an [Audit Log Entry](#DOCS_RESOURCES_AUDIT_LOG/audit-log-entry-object) object. This event is only sent to bots with the `VIEW_AUDIT_LOG` permission.

#### Guild Ban Add

Sent when a user is banned from a guild.
Expand Down