From 51cf8fd2df3cf7a602d05540627a5ad8af6baa58 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Wed, 9 Sep 2020 23:17:26 -0400 Subject: rename and reorder a bunch of discord stuff --- discord/role.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 discord/role.cpp (limited to 'discord/role.cpp') diff --git a/discord/role.cpp b/discord/role.cpp new file mode 100644 index 0000000..9e77f2b --- /dev/null +++ b/discord/role.cpp @@ -0,0 +1,15 @@ +#include "role.hpp" + +void from_json(const nlohmann::json &j, Role &m) { + JS_D("id", m.ID); + JS_D("name", m.Name); + JS_D("color", m.Color); + JS_D("hoist", m.IsHoisted); + JS_D("position", m.Position); + JS_D("permissions", m.PermissionsLegacy); + std::string tmp; + JS_D("permissions_new", tmp); + m.Permissions = std::stoull(tmp); + JS_D("managed", m.IsManaged); + JS_D("mentionable", m.IsMentionable); +} -- cgit v1.2.3