aboutsummaryrefslogtreecommitdiff
path: root/lib/models/guild/role_t.mli
diff options
context:
space:
mode:
authorAdelyn Breelove <[email protected]>2019-01-28 09:48:49 -0700
committerAdelyn Breelove <[email protected]>2019-01-28 09:48:49 -0700
commitf43c41dcf56a30f3fac0de07349b2c505203c380 (patch)
tree2d2e228a2dd1cd489927cfec547494a433bded42 /lib/models/guild/role_t.mli
parentFix Message.t.mentions (diff)
downloaddisml-f43c41dcf56a30f3fac0de07349b2c505203c380.tar.xz
disml-f43c41dcf56a30f3fac0de07349b2c505203c380.zip
Add more docs
Diffstat (limited to 'lib/models/guild/role_t.mli')
-rw-r--r--lib/models/guild/role_t.mli21
1 files changed, 12 insertions, 9 deletions
diff --git a/lib/models/guild/role_t.mli b/lib/models/guild/role_t.mli
index 99517b8..6fd023f 100644
--- a/lib/models/guild/role_t.mli
+++ b/lib/models/guild/role_t.mli
@@ -1,3 +1,4 @@
+(** A role as Discord sends it. Only difference between this and {!t} is the lack of the guild_id field. *)
type role = {
id: Role_id.t;
name: string;
@@ -9,16 +10,18 @@ type role = {
mentionable: bool;
} [@@deriving sexp, yojson]
+(** A role object. *)
type t = {
- id: Role_id.t;
- name: string;
- colour: int;
- hoist: bool;
- position: int;
- permissions: int;
- managed: bool;
- mentionable: bool;
- guild_id: Guild_id_t.t;
+ id: Role_id.t; (** The role's snowflake ID. *)
+ name: string; (** The role's name. *)
+ 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. *)
+ 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. *)
} [@@deriving sexp, yojson]
+(** Convenience method to produce {!t} from {!role} and a snowflake. *)
val wrap : guild_id:Snowflake.t -> role -> t \ No newline at end of file