From 557aa0b426d0cf35f4ced29e197d060a305527e6 Mon Sep 17 00:00:00 2001 From: jamesbt365 Date: Sun, 24 Nov 2024 23:17:15 +0000 Subject: [PATCH 1/2] Add guild_id to ReactionRemoveAll --- src/gateway/client/dispatch.rs | 1 + src/gateway/client/event_handler.rs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gateway/client/dispatch.rs b/src/gateway/client/dispatch.rs index fba9e54b907..ae16e8d04f0 100644 --- a/src/gateway/client/dispatch.rs +++ b/src/gateway/client/dispatch.rs @@ -325,6 +325,7 @@ fn update_cache_with_event( removed_reaction: event.reaction, }, Event::ReactionRemoveAll(event) => FullEvent::ReactionRemoveAll { + guild_id: event.guild_id, channel_id: event.channel_id, removed_from_message_id: event.message_id, }, diff --git a/src/gateway/client/event_handler.rs b/src/gateway/client/event_handler.rs index b212f54f975..76bf60ee212 100644 --- a/src/gateway/client/event_handler.rs +++ b/src/gateway/client/event_handler.rs @@ -315,8 +315,8 @@ event_handler! { /// Dispatched when all reactions of a message are detached from a message. /// - /// Provides the channel's id and the message's id. - ReactionRemoveAll { channel_id: ChannelId, removed_from_message_id: MessageId } => async fn reaction_remove_all(&self, ctx: Context); + /// Provides the channel's id, the message's id, and guild's id if in a guild. + ReactionRemoveAll { guild_id: Option, channel_id: ChannelId, removed_from_message_id: MessageId } => async fn reaction_remove_all(&self, ctx: Context); /// Dispatched when all reactions of a message are detached from a message. /// From f6cf73ceb8995c230c5637aacb753ee89c0cffd4 Mon Sep 17 00:00:00 2001 From: jamesbt365 Date: Sun, 24 Nov 2024 23:42:19 +0000 Subject: [PATCH 2/2] Amend wording --- src/gateway/client/event_handler.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gateway/client/event_handler.rs b/src/gateway/client/event_handler.rs index 76bf60ee212..fa5d61a050f 100644 --- a/src/gateway/client/event_handler.rs +++ b/src/gateway/client/event_handler.rs @@ -315,7 +315,7 @@ event_handler! { /// Dispatched when all reactions of a message are detached from a message. /// - /// Provides the channel's id, the message's id, and guild's id if in a guild. + /// Provides the channel's id, message's id, and guild's id if in a guild. ReactionRemoveAll { guild_id: Option, channel_id: ChannelId, removed_from_message_id: MessageId } => async fn reaction_remove_all(&self, ctx: Context); /// Dispatched when all reactions of a message are detached from a message.