blob: ae6b89460d66ee9af23653b8465ec28713004c48 (
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
33
34
35
36
37
38
39
40
41
42
43
|
open Core
type partial_member = {
nick: string option [@default None];
roles: Role_id.t list;
joined_at: string;
deaf: bool;
mute: bool;
} [@@deriving sexp, yojson { strict = false}]
type member = {
nick: string option [@default None];
roles: Role_id.t list;
joined_at: string;
deaf: bool;
mute: bool;
user: User_t.t;
} [@@deriving sexp, yojson { strict = false}]
type member_wrapper = {
guild_id: Guild_id_t.t;
user: User_t.t;
} [@@deriving sexp, yojson { strict = false }]
type member_update = {
guild_id: Guild_id_t.t;
roles: Role_id.t list [@default []];
user: User_t.t;
nick: string option [@default None];
} [@@deriving sexp, yojson { strict = false}]
type t = {
nick: string option [@default None];
roles: Role_id.t list;
joined_at: string;
deaf: bool;
mute: bool;
user: User_t.t;
guild_id: Guild_id_t.t;
} [@@deriving sexp, yojson { strict = false}]
let wrap ~guild_id ({nick;roles;joined_at;deaf;mute;user}:member) =
{nick;roles;joined_at;deaf;mute;user;guild_id = `Guild_id guild_id}
|