aboutsummaryrefslogtreecommitdiff
path: root/lib/models/user
diff options
context:
space:
mode:
authorAdelyn Breelove <[email protected]>2019-02-04 13:59:23 -0700
committerAdelyn Breelove <[email protected]>2019-02-04 13:59:23 -0700
commit23cc7c6ea03ac6ad92c8da3101eb878daeb3bc2e (patch)
tree42441f45c99e8bfaeabf4cd2083d4e375c41d92e /lib/models/user
parentUpdate yojson to 1.6.0 (diff)
downloaddisml-23cc7c6ea03ac6ad92c8da3101eb878daeb3bc2e.tar.xz
disml-23cc7c6ea03ac6ad92c8da3101eb878daeb3bc2e.zip
Update to latest master on ppx_deriving_yojson
Diffstat (limited to 'lib/models/user')
-rw-r--r--lib/models/user/activity.ml2
-rw-r--r--lib/models/user/activity.mli2
-rw-r--r--lib/models/user/presence.ml2
-rw-r--r--lib/models/user/presence.mli2
-rw-r--r--lib/models/user/user_t.ml4
-rw-r--r--lib/models/user/user_t.mli4
6 files changed, 8 insertions, 8 deletions
diff --git a/lib/models/user/activity.ml b/lib/models/user/activity.ml
index c9b73d8..926c899 100644
--- a/lib/models/user/activity.ml
+++ b/lib/models/user/activity.ml
@@ -4,4 +4,4 @@ type t = {
name: string;
kind: int [@key "type"];
url: string option [@default None];
-} [@@deriving sexp, yojson { strict = false}] \ No newline at end of file
+} [@@deriving sexp, yojson { strict = false; exn = true }] \ No newline at end of file
diff --git a/lib/models/user/activity.mli b/lib/models/user/activity.mli
index 1ddd4e7..2757f54 100644
--- a/lib/models/user/activity.mli
+++ b/lib/models/user/activity.mli
@@ -3,4 +3,4 @@ type t = {
name: string; (** The name of the activity. *)
kind: int; (** 0 = Playing, 1 = Streaming, 2 = Listening, 3 = Watching *)
url: string option; (** Stream URL. Only validated for kind = 1. *)
-} [@@deriving sexp, yojson] \ No newline at end of file
+} [@@deriving sexp, yojson { exn = true }] \ No newline at end of file
diff --git a/lib/models/user/presence.ml b/lib/models/user/presence.ml
index 0b18a49..0b83000 100644
--- a/lib/models/user/presence.ml
+++ b/lib/models/user/presence.ml
@@ -7,4 +7,4 @@ type t = {
guild_id: Guild_id_t.t;
status: string;
activities: Activity.t list;
-} [@@deriving sexp, yojson { strict = false}] \ No newline at end of file
+} [@@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 d75d408..2df252b 100644
--- a/lib/models/user/presence.mli
+++ b/lib/models/user/presence.mli
@@ -6,4 +6,4 @@ type t = {
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] \ No newline at end of file
+} [@@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 8958e84..f001e4a 100644
--- a/lib/models/user/user_t.ml
+++ b/lib/models/user/user_t.ml
@@ -2,7 +2,7 @@ open Core
type partial_user = {
id: User_id_t.t;
-} [@@deriving sexp, yojson { strict = false}]
+} [@@deriving sexp, yojson { strict = false; exn = true }]
type t = {
id: User_id_t.t;
@@ -10,4 +10,4 @@ type t = {
discriminator: string;
avatar: string option [@default None];
bot: bool [@default false];
-} [@@deriving sexp, yojson { strict = false }] \ No newline at end of file
+} [@@deriving sexp, yojson { strict = false; exn = true }] \ No newline at end of file
diff --git a/lib/models/user/user_t.mli b/lib/models/user/user_t.mli
index 645df3e..7b8f6b6 100644
--- a/lib/models/user/user_t.mli
+++ b/lib/models/user/user_t.mli
@@ -1,7 +1,7 @@
(** A partial user. Used internally. *)
type partial_user = {
id: User_id_t.t;
-} [@@deriving sexp, yojson]
+} [@@deriving sexp, yojson { exn = true }]
(** A user object. *)
type t = {
@@ -10,4 +10,4 @@ type t = {
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] \ No newline at end of file
+} [@@deriving sexp, yojson { exn = true }] \ No newline at end of file