aboutsummaryrefslogtreecommitdiff
path: root/lib/models/event_models.ml
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/event_models.ml
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/event_models.ml')
-rw-r--r--lib/models/event_models.ml50
1 files changed, 25 insertions, 25 deletions
diff --git a/lib/models/event_models.ml b/lib/models/event_models.ml
index 43717ee..2dba4a4 100644
--- a/lib/models/event_models.ml
+++ b/lib/models/event_models.ml
@@ -34,7 +34,7 @@ module ChannelPinsUpdate = struct
type t = {
channel_id: Channel_id.t;
last_pin_timestamp: string option [@default None];
- } [@@deriving sexp, yojson { strict = false }]
+ } [@@deriving sexp, yojson { strict = false; exn = true }]
let deserialize = of_yojson_exn
end
@@ -43,7 +43,7 @@ module ChannelRecipientAdd = struct
type t = {
channel_id: Channel_id.t;
user: User_t.t;
- } [@@deriving sexp, yojson { strict = false }]
+ } [@@deriving sexp, yojson { strict = false; exn = true }]
let deserialize = of_yojson_exn
end
@@ -52,7 +52,7 @@ module ChannelRecipientRemove = struct
type t = {
channel_id: Channel_id.t;
user: User_t.t;
- } [@@deriving sexp, yojson { strict = false }]
+ } [@@deriving sexp, yojson { strict = false; exn = true }]
let deserialize = of_yojson_exn
end
@@ -61,7 +61,7 @@ module GuildBanAdd = struct
type t = {
guild_id: Guild_id.t;
user: User_t.t;
- } [@@deriving sexp, yojson { strict = false }]
+ } [@@deriving sexp, yojson { strict = false; exn = true }]
let deserialize = of_yojson_exn
end
@@ -70,7 +70,7 @@ module GuildBanRemove = struct
type t = {
guild_id: Guild_id.t;
user: User_t.t;
- } [@@deriving sexp, yojson { strict = false }]
+ } [@@deriving sexp, yojson { strict = false; exn = true }]
let deserialize = of_yojson_exn
end
@@ -88,7 +88,7 @@ end
module GuildDelete = struct
type t = {
id: Guild_id.t;
- } [@@deriving sexp, yojson { strict = false }]
+ } [@@deriving sexp, yojson { strict = false; exn = true }]
let deserialize = of_yojson_exn
end
@@ -107,7 +107,7 @@ module GuildEmojisUpdate = struct
type t = {
emojis: Emoji.t list;
guild_id: Guild_id.t
- } [@@deriving sexp, yojson { strict = false }]
+ } [@@deriving sexp, yojson { strict = false; exn = true }]
let deserialize = of_yojson_exn
end
@@ -124,7 +124,7 @@ module GuildMemberRemove = struct
type t = {
guild_id: Guild_id.t;
user: User_t.t;
- } [@@deriving sexp, yojson { strict = false }]
+ } [@@deriving sexp, yojson { strict = false; exn = true }]
let deserialize = of_yojson_exn
end
@@ -135,7 +135,7 @@ module GuildMemberUpdate = struct
nick: string option;
roles: Role_id.t list;
user: User_t.t;
- } [@@deriving sexp, yojson { strict = false }]
+ } [@@deriving sexp, yojson { strict = false; exn = true }]
let deserialize = of_yojson_exn
end
@@ -144,7 +144,7 @@ module GuildMembersChunk = struct
type t = {
guild_id: Guild_id.t;
members: (Snowflake.t * Member_t.t) list;
- } [@@deriving sexp, yojson { strict = false }]
+ } [@@deriving sexp, yojson { strict = false; exn = true }]
let deserialize = of_yojson_exn
end
@@ -153,7 +153,7 @@ module GuildRoleCreate = struct
type t = {
guild_id: Guild_id.t;
role: Role_t.role;
- } [@@deriving sexp, yojson { strict = false }]
+ } [@@deriving sexp, yojson { strict = false; exn = true }]
let deserialize = of_yojson_exn
end
@@ -162,7 +162,7 @@ module GuildRoleDelete = struct
type t = {
guild_id: Guild_id.t;
role_id: Role_id.t;
- } [@@deriving sexp, yojson { strict = false }]
+ } [@@deriving sexp, yojson { strict = false; exn = true }]
let deserialize = of_yojson_exn
end
@@ -171,7 +171,7 @@ module GuildRoleUpdate = struct
type t = {
guild_id: Guild_id.t;
role: Role_t.role;
- } [@@deriving sexp, yojson { strict = false }]
+ } [@@deriving sexp, yojson { strict = false; exn = true }]
let deserialize = of_yojson_exn
end
@@ -180,7 +180,7 @@ end
module GuildUnavailable = struct
type t = {
guild_id: Guild_id.t;
- } [@@deriving sexp, yojson { strict = false }]
+ } [@@deriving sexp, yojson { strict = false; exn = true }]
let deserialize = of_yojson_exn
end
@@ -200,7 +200,7 @@ module MessageDelete = struct
id: Message_id.t;
channel_id: Channel_id.t;
guild_id: Guild_id.t option [@default None];
- } [@@deriving sexp, yojson { strict = false }]
+ } [@@deriving sexp, yojson { strict = false; exn = true }]
let deserialize = of_yojson_exn
end
@@ -226,7 +226,7 @@ module MessageUpdate = struct
pinned: bool option [@default None];
webhook_id: Snowflake.t option [@default None];
kind: int option [@default None][@key "type"];
- } [@@deriving sexp, yojson { strict = false}]
+ } [@@deriving sexp, yojson { strict = false; exn = true }]
let deserialize = of_yojson_exn
end
@@ -236,7 +236,7 @@ module MessageDeleteBulk = struct
guild_id: Guild_id.t option [@default None];
channel_id: Channel_id.t;
ids: Message_id.t list;
- } [@@deriving sexp, yojson { strict = false }]
+ } [@@deriving sexp, yojson { strict = false; exn = true }]
let deserialize = of_yojson_exn
end
@@ -260,7 +260,7 @@ module ReactionAdd = struct
message_id: Message_id.t;
guild_id: Guild_id.t option [@default None];
emoji: Emoji.partial_emoji;
- } [@@deriving sexp, yojson { strict = false }]
+ } [@@deriving sexp, yojson { strict = false; exn = true }]
let deserialize = of_yojson_exn
end
@@ -272,7 +272,7 @@ module ReactionRemove = struct
message_id: Message_id.t;
guild_id: Guild_id.t option [@default None];
emoji: Emoji.partial_emoji;
- } [@@deriving sexp, yojson { strict = false }]
+ } [@@deriving sexp, yojson { strict = false; exn = true }]
let deserialize = of_yojson_exn
end
@@ -282,7 +282,7 @@ module ReactionRemoveAll = struct
channel_id: Channel_id.t;
message_id: Message_id.t;
guild_id: Guild_id.t option [@default None];
- } [@@deriving sexp, yojson { strict = false }]
+ } [@@deriving sexp, yojson { strict = false; exn = true }]
let deserialize = of_yojson_exn
end
@@ -294,7 +294,7 @@ module Ready = struct
private_channels: Channel_id.t list;
guilds: Guild_t.unavailable list;
session_id: string;
- } [@@deriving sexp, yojson { strict = false }]
+ } [@@deriving sexp, yojson { strict = false; exn = true }]
let deserialize = of_yojson_exn
end
@@ -302,7 +302,7 @@ end
module Resumed = struct
type t = {
trace: string option list [@key "_trace"];
- } [@@deriving sexp, yojson { strict = false }]
+ } [@@deriving sexp, yojson { strict = false; exn = true }]
let deserialize = of_yojson_exn
end
@@ -313,7 +313,7 @@ module TypingStart = struct
guild_id: Guild_id.t option [@default None];
timestamp: int;
user_id: User_id.t;
- } [@@deriving sexp, yojson { strict = false }]
+ } [@@deriving sexp, yojson { strict = false; exn = true }]
let deserialize = of_yojson_exn
end
@@ -321,7 +321,7 @@ end
module UserUpdate = struct
type t = {
user: User_t.t;
- } [@@deriving sexp, yojson { strict = false }]
+ } [@@deriving sexp, yojson { strict = false; exn = true }]
let deserialize ev =
let user = User_t.of_yojson_exn ev in
@@ -332,7 +332,7 @@ module WebhookUpdate = struct
type t = {
channel_id: Channel_id.t;
guild_id: Guild_id.t;
- } [@@deriving sexp, yojson { strict = false }]
+ } [@@deriving sexp, yojson { strict = false; exn = true }]
let deserialize = of_yojson_exn
end