aboutsummaryrefslogtreecommitdiff
path: root/lib/models/user/user_t.mli
blob: 78f7a280bafb05d53ddcd2273ac5cabe226ef3b1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
(** A partial user. Used internally. *)
type partial_user = {
    id: User_id_t.t;
    username: string option;
    discriminator: string option;
    avatar: string option;
    bot: bool;
} [@@deriving sexp, yojson { exn = true }]

(** A user object. *)
type t = {
    id: User_id_t.t; (** The user's Snowflake ID, wrapped in the convenience [`User_id] type. *)
    username: string; (** The username of the user. *)
    discriminator: string; (** The 4 digits, as a string, that come after the '#' in a Discord username. *)
    avatar: string option; (** The hash of the user avatar, if they have one set. See {!User.face} to get the avatar URL. *)
    bot: bool; (** Whether the user is a bot. *)
} [@@deriving sexp, yojson { exn = true }]