aboutsummaryrefslogtreecommitdiff
path: root/lib/models/user/user_t.ml
blob: 44f33fe7d6b0ea1c687810d6e31ce1a5f16205e4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
let string_of_sexp = Base.String.t_of_sexp
let sexp_of_string = Base.String.sexp_of_t
let option_of_sexp = Base.Option.t_of_sexp
let sexp_of_option = Base.Option.sexp_of_t
let bool_of_sexp   = Base.Bool.t_of_sexp
let sexp_of_bool   = Base.Bool.sexp_of_t

type partial_user = {
    id: User_id_t.t;
    username: string option [@default None];
    discriminator: string option [@default None];
    avatar: string option [@default None];
    bot: bool [@default false];
} [@@deriving sexp, yojson { strict = false; exn = true }]

type t = {
    id: User_id_t.t;
    username: string;
    discriminator: string;
    avatar: string option [@default None];
    bot: bool [@default false];
} [@@deriving sexp, yojson { strict = false; exn = true }]