diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-10-13 02:35:02 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-10-13 02:35:02 -0400 |
commit | 99597a80d2eb9752882791d458036c2c17969767 (patch) | |
tree | 653aafc326b79875c9117b29b8c4ca5407b3023e /discord/user.cpp | |
parent | c17842c16f10f55f2f0923e94033a482ef98838e (diff) | |
download | abaddon-portaudio-99597a80d2eb9752882791d458036c2c17969767.tar.gz abaddon-portaudio-99597a80d2eb9752882791d458036c2c17969767.zip |
add PRESENCE_UPDATE handling (for user object only)
Diffstat (limited to 'discord/user.cpp')
-rw-r--r-- | discord/user.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/discord/user.cpp b/discord/user.cpp index 2e136e1..c7858d5 100644 --- a/discord/user.cpp +++ b/discord/user.cpp @@ -32,3 +32,22 @@ void from_json(const nlohmann::json &j, User &m) { JS_ON("nsfw_allowed", m.IsNSFWAllowed); JS_ON("phone", m.Phone); } + +void User::update_from_json(const nlohmann::json &j, User &m) { + JS_ON("username", m.Username); + JS_ON("discriminator", m.Discriminator); + JS_ON("avatar", m.Avatar); + JS_ON("bot", m.IsBot); + JS_ON("system", m.IsSystem); + JS_ON("mfa_enabled", m.IsMFAEnabled); + JS_ON("locale", m.Locale); + JS_ON("verified", m.IsVerified); + JS_ON("email", m.Email); + JS_ON("flags", m.Flags); + JS_ON("premium_type", m.PremiumType); + JS_ON("public_flags", m.PublicFlags); + JS_ON("desktop", m.IsDesktop); + JS_ON("mobile", m.IsMobile); + JS_ON("nsfw_allowed", m.IsNSFWAllowed); + JS_ON("phone", m.Phone); +} |