Skip to content

Commit

Permalink
Added user_id to message_reaction_add_t (#1376)
Browse files Browse the repository at this point in the history
  • Loading branch information
folle authored Feb 2, 2025
1 parent c49df6e commit 9135957
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/dpp/events/message_reaction_add.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ void message_reaction_add::handle(discord_client* client, json &j, const std::st
dpp::message_reaction_add_t mra(client->owner, client->shard_id, raw);
snowflake guild_id = snowflake_not_null(&d, "guild_id");
snowflake channel_id = snowflake_not_null(&d, "channel_id");
snowflake user_id = snowflake_not_null(&d, "user_id");

guild* g = find_guild(guild_id);
channel* c = find_channel(channel_id);
Expand All @@ -50,6 +51,7 @@ void message_reaction_add::handle(discord_client* client, json &j, const std::st
mra.reacting_guild.id = guild_id;

mra.reacting_user = dpp::user().fill_from_json(&(d["member"]["user"]));
mra.reacting_user.id = user_id;
mra.reacting_member = dpp::guild_member().fill_from_json(&(d["member"]), guild_id, mra.reacting_user.id);

mra.channel_id = channel_id;
Expand Down

0 comments on commit 9135957

Please # to comment.