handle GUILD_MEMBER_UPDATE

This commit is contained in:
ouwou
2020-10-13 02:05:59 -04:00
parent f29cfc6951
commit c17842c16f
6 changed files with 42 additions and 0 deletions

View File

@@ -9,3 +9,13 @@ void from_json(const nlohmann::json &j, GuildMember &m) {
JS_D("deaf", m.IsDeafened);
JS_D("mute", m.IsMuted);
}
GuildMember GuildMember::from_update_json(const nlohmann::json &j) {
GuildMember ret;
JS_D("roles", ret.Roles);
JS_D("user", ret.User);
JS_ON("nick", ret.Nickname);
JS_D("joined_at", ret.JoinedAt);
JS_ON("premium_since", ret.PremiumSince);
return ret;
}