From 86fae769a5f8d9a083775f8c369e0966eb0e4ed8 Mon Sep 17 00:00:00 2001 From: snek Date: Thu, 12 Jan 2023 13:34:03 -0800 Subject: [PATCH 1/6] Add GUILD_AUDIT_LOG_ENTRY_CREATE event --- docs/topics/Gateway_Events.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/topics/Gateway_Events.md b/docs/topics/Gateway_Events.md index 6450bbea57..fa9a19d291 100644 --- a/docs/topics/Gateway_Events.md +++ b/docs/topics/Gateway_Events.md @@ -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 | @@ -361,7 +362,7 @@ Sent on connection to the websocket. Defines the heartbeat interval that an app The ready event is dispatched when a client has completed the initial handshake with the gateway (for new sessions). The ready event can be the largest and most complex event the gateway will send, as it contains all the state required for a client to begin interacting with the rest of the platform. -`guilds` are the guilds of which your bot is a member. They start out as unavailable when you connect to the gateway. As they become available, your bot will be notified via [Guild Create](#DOCS_TOPICS_GATEWAY_EVENTS/guild-create) events. +`guilds` are the guilds of which your bot is a member. They start out as unavailable when you connect to the gateway. As they become available, your bot will be notified via [\](#DOCS_TOPICS_GATEWAY_EVENTS/guild-create) events. ###### Ready Event Fields @@ -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. + #### Guild Ban Add Sent when a user is banned from a guild. From 2adb839240f098cfe14ca63620722351fe4e1475 Mon Sep 17 00:00:00 2001 From: snek Date: Thu, 12 Jan 2023 13:34:59 -0800 Subject: [PATCH 2/6] Update Gateway_Events.md --- docs/topics/Gateway_Events.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/topics/Gateway_Events.md b/docs/topics/Gateway_Events.md index fa9a19d291..b51b66f270 100644 --- a/docs/topics/Gateway_Events.md +++ b/docs/topics/Gateway_Events.md @@ -362,7 +362,7 @@ Sent on connection to the websocket. Defines the heartbeat interval that an app The ready event is dispatched when a client has completed the initial handshake with the gateway (for new sessions). The ready event can be the largest and most complex event the gateway will send, as it contains all the state required for a client to begin interacting with the rest of the platform. -`guilds` are the guilds of which your bot is a member. They start out as unavailable when you connect to the gateway. As they become available, your bot will be notified via [\](#DOCS_TOPICS_GATEWAY_EVENTS/guild-create) events. +`guilds` are the guilds of which your bot is a member. They start out as unavailable when you connect to the gateway. As they become available, your bot will be notified via [Guild Create](#DOCS_TOPICS_GATEWAY_EVENTS/guild-create) events. ###### Ready Event Fields From dcf0a2990f434715794de8b2571479c6d045d10b Mon Sep 17 00:00:00 2001 From: snek Date: Thu, 12 Jan 2023 14:53:51 -0800 Subject: [PATCH 3/6] Update Gateway.md --- docs/topics/Gateway.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/topics/Gateway.md b/docs/topics/Gateway.md index 850f67b2a7..a0aa5f9ae4 100644 --- a/docs/topics/Gateway.md +++ b/docs/topics/Gateway.md @@ -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 From 4665b91f7d3f8853fad0d51ec76c025599175437 Mon Sep 17 00:00:00 2001 From: snek Date: Thu, 12 Jan 2023 23:17:47 -0800 Subject: [PATCH 4/6] Update Gateway_Events.md --- docs/topics/Gateway_Events.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/topics/Gateway_Events.md b/docs/topics/Gateway_Events.md index b51b66f270..5d044de583 100644 --- a/docs/topics/Gateway_Events.md +++ b/docs/topics/Gateway_Events.md @@ -589,7 +589,7 @@ Sent when a guild becomes or was already unavailable due to an outage, or when t #### 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. +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 From 655e11eecf898d001ef1496dd2f4f3cc165b1da4 Mon Sep 17 00:00:00 2001 From: snek Date: Tue, 17 Jan 2023 17:22:31 -0800 Subject: [PATCH 5/6] Update Change_Log.md --- docs/Change_Log.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/Change_Log.md b/docs/Change_Log.md index 9f57f66fd1..b46b6be3d2 100644 --- a/docs/Change_Log.md +++ b/docs/Change_Log.md @@ -1,5 +1,11 @@ # Change Log +## Guild Audit Log Events + +#### Jan ??, 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 From ac0862d058fc3f046868da0f9b224bca817c002f Mon Sep 17 00:00:00 2001 From: snek Date: Wed, 18 Jan 2023 10:14:44 -0800 Subject: [PATCH 6/6] Update Change_Log.md --- docs/Change_Log.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Change_Log.md b/docs/Change_Log.md index b46b6be3d2..92a3c40d7c 100644 --- a/docs/Change_Log.md +++ b/docs/Change_Log.md @@ -2,7 +2,7 @@ ## Guild Audit Log Events -#### Jan ??, 2023 +#### 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.