Get role.permissions correctly on construction.

This commit is contained in:
SeanOMik 2020-06-18 18:29:00 -05:00
parent 28649645e3
commit 5fa52cd38b
No known key found for this signature in database
GPG Key ID: FA4D55AC05268A88
1 changed files with 3 additions and 2 deletions

View File

@ -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()
)
)
result.permissions = newPermissions(result.id, PermissionType.permTypeRole, uint(json["permissions"].getInt()))