File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -1120,6 +1120,7 @@ json message::to_json(bool with_id, bool is_interaction_response) const {
11201120 /* Populate message reference */
11211121 if (message_reference.channel_id || message_reference.guild_id || message_reference.message_id ) {
11221122 j[" message_reference" ] = json::object ();
1123+ j[" message_reference" ][" type" ] = static_cast <uint32_t >(message_reference.type );
11231124 if (message_reference.channel_id ) {
11241125 j[" message_reference" ][" channel_id" ] = std::to_string (message_reference.channel_id );
11251126 }
@@ -1409,7 +1410,7 @@ message& message::fill_from_json(json* d, cache_policy_t cp) {
14091410 }
14101411 if (d->find (" message_reference" ) != d->end ()) {
14111412 json& mr = (*d)[" message_reference" ];
1412- message_reference.type = ( message_ref_type) int8_not_null (&mr, " type" );
1413+ message_reference.type = static_cast < message_ref_type>( int8_not_null (&mr, " type" ) );
14131414 message_reference.channel_id = snowflake_not_null (&mr, " channel_id" );
14141415 message_reference.guild_id = snowflake_not_null (&mr, " guild_id" );
14151416 message_reference.message_id = snowflake_not_null (&mr, " message_id" );
You can’t perform that action at this time.
0 commit comments