From 578a0474ee06aac0eebc7b0e3751a4d468ff387d Mon Sep 17 00:00:00 2001 From: Axel Joly Date: Tue, 18 Jul 2023 11:56:03 +0200 Subject: [PATCH] feat: add message_author_id to MessageReactionAdd Gateway event --- .../discordjson/json/gateway/MessageReactionAdd.java | 8 ++++++++ src/test/resources/gateway/MessageReactionAdd.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/discord4j/discordjson/json/gateway/MessageReactionAdd.java b/src/main/java/discord4j/discordjson/json/gateway/MessageReactionAdd.java index 47525c39..f28f3062 100644 --- a/src/main/java/discord4j/discordjson/json/gateway/MessageReactionAdd.java +++ b/src/main/java/discord4j/discordjson/json/gateway/MessageReactionAdd.java @@ -20,12 +20,20 @@ static ImmutableMessageReactionAdd.Builder builder() { @JsonProperty("user_id") Id userId(); + @JsonProperty("channel_id") Id channelId(); + @JsonProperty("message_id") Id messageId(); + @JsonProperty("guild_id") Possible guildId(); + Possible member(); + EmojiData emoji(); + + @JsonProperty("message_author_id") + Id messageAuthorId(); } diff --git a/src/test/resources/gateway/MessageReactionAdd.json b/src/test/resources/gateway/MessageReactionAdd.json index efc6b6ba..5434e492 100644 --- a/src/test/resources/gateway/MessageReactionAdd.json +++ b/src/test/resources/gateway/MessageReactionAdd.json @@ -1 +1 @@ -{"t":"MESSAGE_REACTION_ADD","s":27820,"op":0,"d":{"user_id":"123456789012345678","message_id":"679003565884440580","member":{"user":{"username":"a","id":"123456789012345678","discriminator":"5520","avatar":"25a09a99ac0487bf846125084d9c7346"},"roles":["186563072540934144","186605392971694081"],"mute":false,"joined_at":"2016-05-28T02:57:17.190000+00:00","hoisted_role":null,"deaf":false},"emoji":{"name":"😊","id":null},"channel_id":"185949590652977152","guild_id":"123456789012345678"}} +{"t":"MESSAGE_REACTION_ADD","s":27820,"op":0,"d":{"user_id":"123456789012345678","message_id":"679003565884440580","message_author_id":"0","member":{"user":{"username":"a","id":"123456789012345678","discriminator":"5520","avatar":"25a09a99ac0487bf846125084d9c7346"},"roles":["186563072540934144","186605392971694081"],"mute":false,"joined_at":"2016-05-28T02:57:17.190000+00:00","hoisted_role":null,"deaf":false},"emoji":{"name":"😊","id":null},"channel_id":"185949590652977152","guild_id":"123456789012345678"}}