diff options
Diffstat (limited to 'src/discord/role.cpp')
-rw-r--r-- | src/discord/role.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/discord/role.cpp b/src/discord/role.cpp new file mode 100644 index 0000000..07a912e --- /dev/null +++ b/src/discord/role.cpp @@ -0,0 +1,14 @@ +#include "role.hpp" + +void from_json(const nlohmann::json &j, RoleData &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); + std::string tmp; + JS_D("permissions", tmp); + m.Permissions = static_cast<Permission>(std::stoull(tmp)); + JS_D("managed", m.IsManaged); + JS_D("mentionable", m.IsMentionable); +} |