aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdelyn Breedlove <[email protected]>2019-02-20 10:16:38 -0700
committerAdelyn Breedlove <[email protected]>2019-02-20 10:16:38 -0700
commitfc762f8e402ebb7f413768a0ab36c7bb5376fe57 (patch)
tree4ab470e818d812bd01f52986b663eb9a96f2ff5b
parentExport permissions as Models.Permissions (diff)
downloaddisml-fc762f8e402ebb7f413768a0ab36c7bb5376fe57.tar.xz
disml-fc762f8e402ebb7f413768a0ab36c7bb5376fe57.zip
Add permissions to role models
-rw-r--r--lib/models/guild/role_t.ml4
-rw-r--r--lib/models/guild/role_t.mli4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/models/guild/role_t.ml b/lib/models/guild/role_t.ml
index d518b13..2927c20 100644
--- a/lib/models/guild/role_t.ml
+++ b/lib/models/guild/role_t.ml
@@ -6,7 +6,7 @@ type role = {
colour: int [@key "color"];
hoist: bool;
position: int;
- permissions: int;
+ permissions: Permissions.t;
managed: bool;
mentionable: bool;
} [@@deriving sexp, yojson { strict = false; exn = true }]
@@ -17,7 +17,7 @@ type t = {
colour: int [@key "color"];
hoist: bool;
position: int;
- permissions: int;
+ permissions: Permissions.t;
managed: bool;
mentionable: bool;
guild_id: Guild_id_t.t;
diff --git a/lib/models/guild/role_t.mli b/lib/models/guild/role_t.mli
index d9caf7a..98c1559 100644
--- a/lib/models/guild/role_t.mli
+++ b/lib/models/guild/role_t.mli
@@ -5,7 +5,7 @@ type role = {
colour: int;
hoist: bool;
position: int;
- permissions: int;
+ permissions: Permissions.t;
managed: bool;
mentionable: bool;
} [@@deriving sexp, yojson { exn = true }]
@@ -17,7 +17,7 @@ type t = {
colour: int; (** The integer representation of the role colour. *)
hoist: bool; (** Whether the role is hoisted. This property controls whether the role is separated on the sidebar. *)
position: int; (** The position of the role. [@everyone] begins the list at 0. *)
- permissions: int; (** The integer representation of the permissions the role has. *)
+ permissions: Permissions.t; (** The integer representation of the permissions the role has. *)
managed: bool; (** Whether the guild is managed by an integration. *)
mentionable: bool; (** Whether the role can be mentioned. *)
guild_id: Guild_id_t.t; (** The guild ID this role belongs to. *)