From 33ed25b2f66e727911182f1552aa8abfd558c69e Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Mon, 14 Dec 2020 01:40:22 -0500 Subject: add guild role update, create, delete events --- discord/objects.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'discord/objects.cpp') diff --git a/discord/objects.cpp b/discord/objects.cpp index 5936785..ac1dc02 100644 --- a/discord/objects.cpp +++ b/discord/objects.cpp @@ -179,3 +179,18 @@ void to_json(nlohmann::json &j, const ResumeMessage &m) { j["d"]["session_id"] = m.SessionID; j["d"]["seq"] = m.Sequence; } + +void from_json(const nlohmann::json &j, GuildRoleUpdateObject &m) { + JS_D("guild_id", m.GuildID); + JS_D("role", m.Role); +} + +void from_json(const nlohmann::json &j, GuildRoleCreateObject &m) { + JS_D("guild_id", m.GuildID); + JS_D("role", m.Role); +} + +void from_json(const nlohmann::json &j, GuildRoleDeleteObject &m) { + JS_D("guild_id", m.GuildID); + JS_D("role_id", m.RoleID); +} -- cgit v1.2.3