From 5fa52cd38bc58653a81dc58c263dc7e44aade5fd Mon Sep 17 00:00:00 2001 From: SeanOMik Date: Thu, 18 Jun 2020 18:29:00 -0500 Subject: [PATCH] Get role.permissions correctly on construction. --- src/role.nim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/role.nim b/src/role.nim index 66d183c..176a66e 100644 --- a/src/role.nim +++ b/src/role.nim @@ -16,7 +16,8 @@ proc newRole*(json: JsonNode): Role = color: uint(json["color"].getInt()), hoist: json["hoist"].getBool(), position: uint(json["position"].getInt()), - permissions: newPermissions(json["permissions"]), managed: json["managed"].getBool(), mentionable: json["mentionable"].getBool() - ) \ No newline at end of file + ) + + result.permissions = newPermissions(result.id, PermissionType.permTypeRole, uint(json["permissions"].getInt())) \ No newline at end of file