blob: e41f31d8aa90c71be65e12a4275728d04785a2eb (
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
|
open Core
type role = {
id: Snowflake.t;
name: string;
colour: int [@key "color"];
hoist: bool;
position: int;
permissions: int;
managed: bool;
mentionable: bool;
} [@@deriving sexp, yojson { strict = false}]
type role_update = {
role: role;
guild_id: Snowflake.t;
} [@@deriving sexp, yojson { strict = false}]
type t = {
id: Snowflake.t;
name: string;
colour: int [@key "color"];
hoist: bool;
position: int;
permissions: int;
managed: bool;
mentionable: bool;
guild_id: Snowflake.t;
} [@@deriving sexp, yojson { strict = false}]
let wrap ~guild_id ({id;name;colour;hoist;position;permissions;managed;mentionable}:role) =
{id;name;colour;hoist;position;permissions;managed;mentionable;guild_id}
|