diff options
Diffstat (limited to 'discord/user.cpp')
-rw-r--r-- | discord/user.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/discord/user.cpp b/discord/user.cpp index 78d309b..56f0350 100644 --- a/discord/user.cpp +++ b/discord/user.cpp @@ -33,6 +33,13 @@ void from_json(const nlohmann::json &j, User &m) { JS_ON("phone", m.Phone); } +void to_json(nlohmann::json &j, const User &m) { + j["id"] = m.ID; + j["username"] = m.Username; + j["avatar"] = m.Avatar; + // rest of stuff as needed im too lazy and its probably not necessary +} + void User::update_from_json(const nlohmann::json &j, User &m) { JS_RD("username", m.Username); JS_RD("discriminator", m.Discriminator); |