blob: 170504f7e819c7fec36a57f5fce0295e26084461 (
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
|
type partial_member = {
nick: string option;
roles: Role_id.t list;
joined_at: string;
deaf: bool;
mute: bool;
} [@@deriving sexp, yojson]
type member = {
nick: string option;
roles: Role_id.t list;
joined_at: string;
deaf: bool;
mute: bool;
user: User_t.t;
} [@@deriving sexp, yojson]
type member_wrapper = {
guild_id: Guild_id_t.t;
user: User_t.t;
} [@@deriving sexp, yojson]
type member_update = {
guild_id: Guild_id_t.t;
roles: Role_id.t list;
user: User_t.t;
nick: string option;
} [@@deriving sexp, yojson]
(** A member object. *)
type t = {
nick: string option; (** The nickname of the member, if they have one set. *)
roles: Role_id.t list; (** The roles the member has. *)
joined_at: string; (** An ISO8601 timestamp of when the user joined. *)
deaf: bool; (** Whether the user is deafened. *)
mute: bool; (** Whether the user is muted. *)
user: User_t.t; (** The underlying user object for the member. *)
guild_id: Guild_id_t.t; (** The guild ID in which the member exists. *)
} [@@deriving sexp, yojson]
val wrap : guild_id:Snowflake.t -> member -> t
|