@@ -93,15 +93,15 @@ inline void from_json(const nlohmann::json& j, guild& m)
9393 if (j.count (" id" ) && !j[" id" ].is_null ())
9494 m.id = m.guild_id = j[" id" ];
9595 if (j.count (" name" ) && !j[" name" ].is_null ())
96- m.name = j[" name" ];
96+ m.name = j[" name" ]. get <std::string>() ;
9797 if (j.count (" icon" ) && !j[" icon" ].is_null ())
98- m.icon = j[" icon" ];
98+ m.icon = j[" icon" ]. get <std::string>() ;
9999 if (j.count (" splash" ) && !j[" splash" ].is_null ())
100- m.splash = j[" splash" ];
100+ m.splash = j[" splash" ]. get <std::string>() ;
101101 if (j.count (" owner_id" ) && !j[" owner_id" ].is_null ())
102102 m.owner_id = j[" owner_id" ];
103103 if (j.count (" region" ) && !j[" region" ].is_null ())
104- m.region = j[" region" ];
104+ m.region = j[" region" ]. get <std::string>() ;
105105 if (j.count (" afk_channel_id" ) && !j[" afk_channel_id" ].is_null ())
106106 m.afk_channel_id = j[" afk_channel_id" ];
107107 if (j.count (" afk_timeout" ) && !j[" afk_timeout" ].is_null ())
@@ -117,7 +117,7 @@ inline void from_json(const nlohmann::json& j, guild& m)
117117 if (j.count (" mfa_level" ) && !j[" mfa_level" ].is_null ())
118118 m.mfa_level = j[" mfa_level" ];
119119 if (j.count (" joined_at" ) && !j[" joined_at" ].is_null ())
120- m.joined_at = j[" joined_at" ];
120+ m.joined_at = j[" joined_at" ]. get <std::string>() ;
121121 if (j.count (" large" ) && !j[" large" ].is_null ())
122122 m.large = j[" large" ];
123123 if (j.count (" unavailable" ) && !j[" unavailable" ].is_null ())
0 commit comments