@@ -38,14 +38,14 @@ namespace dpp::events {
3838 */
3939void message_poll_vote_remove::handle (discord_client* client, json &j, const std::string &raw) {
4040
41- if (!client->creator ->on_message_poll_vote_add .empty ()) {
42- json d = j[" d" ];
41+ if (!client->creator ->on_message_poll_vote_remove .empty ()) {
42+ json& d = j[" d" ];
4343 dpp::message_poll_vote_remove_t vote (client->owner , client->shard_id , raw);
44- vote.user_id = snowflake_not_null (&j , " user_id" );
45- vote.message_id = snowflake_not_null (&j , " message_id" );
46- vote.channel_id = snowflake_not_null (&j , " channel_id" );
47- vote.guild_id = snowflake_not_null (&j , " guild_id" );
48- vote.answer_id = int32_not_null (&j , " answer_id" );
44+ vote.user_id = snowflake_not_null (&d , " user_id" );
45+ vote.message_id = snowflake_not_null (&d , " message_id" );
46+ vote.channel_id = snowflake_not_null (&d , " channel_id" );
47+ vote.guild_id = snowflake_not_null (&d , " guild_id" );
48+ vote.answer_id = int32_not_null (&d , " answer_id" );
4949 client->creator ->queue_work (1 , [c = client->creator , vote]() {
5050 c->on_message_poll_vote_remove .call (vote);
5151 });
0 commit comments