From 7c9b809078b5cd53e3d54c0004c683da2ec679af Mon Sep 17 00:00:00 2001 From: Adelyn Breedlove Date: Mon, 11 Feb 2019 17:23:59 +0000 Subject: Add a cache --- lib/models/user/presence.ml | 2 -- lib/models/user/presence.mli | 2 -- lib/models/user/user_t.ml | 4 ++++ lib/models/user/user_t.mli | 4 ++++ 4 files changed, 8 insertions(+), 4 deletions(-) (limited to 'lib/models/user') diff --git a/lib/models/user/presence.ml b/lib/models/user/presence.ml index 0b83000..d8683b7 100644 --- a/lib/models/user/presence.ml +++ b/lib/models/user/presence.ml @@ -2,9 +2,7 @@ open Core type t = { user: User_t.partial_user; - roles: Role_id.t list; game: Activity.t option [@default None]; - guild_id: Guild_id_t.t; status: string; activities: Activity.t list; } [@@deriving sexp, yojson { strict = false; exn = true }] \ No newline at end of file diff --git a/lib/models/user/presence.mli b/lib/models/user/presence.mli index 2df252b..ae01373 100644 --- a/lib/models/user/presence.mli +++ b/lib/models/user/presence.mli @@ -1,9 +1,7 @@ (** A user presence. *) type t = { user: User_t.partial_user; (** A partial user that this presence belongs to. *) - roles: Role_id.t list; (** A list of roles that the user has. *) game: Activity.t option; (** The current activity of the user, if any. *) - guild_id: Guild_id_t.t; (** The guild ID in which this presence exists. *) status: string; (** One of [online], [idle], [offline], or [dnd]. *) activities: Activity.t list; (** A list of all of the user's current activities. *) } [@@deriving sexp, yojson { exn = true }] \ No newline at end of file diff --git a/lib/models/user/user_t.ml b/lib/models/user/user_t.ml index f001e4a..b68808d 100644 --- a/lib/models/user/user_t.ml +++ b/lib/models/user/user_t.ml @@ -2,6 +2,10 @@ open Core 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 = { diff --git a/lib/models/user/user_t.mli b/lib/models/user/user_t.mli index 7b8f6b6..78f7a28 100644 --- a/lib/models/user/user_t.mli +++ b/lib/models/user/user_t.mli @@ -1,6 +1,10 @@ (** 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. *) -- cgit v1.2.3