blob: a28f84fa406769d2f1b6447800b197fa32f62a33 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
let string_of_sexp = Base.String.t_of_sexp
let sexp_of_string = Base.String.sexp_of_t
let int_of_sexp = Base.Int.t_of_sexp
let sexp_of_int = Base.Int.sexp_of_t
let bool_of_sexp = Base.Bool.t_of_sexp
let sexp_of_bool = Base.Bool.sexp_of_t
type role = {
id: Role_id.t;
name: string;
colour: int [@key "color"];
hoist: bool;
position: int;
permissions: Permissions.t;
managed: bool;
mentionable: bool;
} [@@deriving sexp, yojson { strict = false; exn = true }]
type t = {
id: Role_id.t;
name: string;
colour: int [@key "color"];
hoist: bool;
position: int;
permissions: Permissions.t;
managed: bool;
mentionable: bool;
guild_id: Guild_id_t.t;
} [@@deriving sexp, yojson { strict = false; exn = true }]
let wrap ~guild_id ({id;name;colour;hoist;position;permissions;managed;mentionable}:role) =
{id;name;colour;hoist;position;permissions;managed;mentionable;guild_id = `Guild_id guild_id}
|