diff options
Diffstat (limited to 'lib/dispatch.ml')
| -rw-r--r-- | lib/dispatch.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/dispatch.ml b/lib/dispatch.ml index cb6e5d9..a4341e1 100644 --- a/lib/dispatch.ml +++ b/lib/dispatch.ml @@ -59,17 +59,17 @@ module Make(H : S.Handler) : S.Dispatch = struct | "GUILD_MEMBER_ADD" -> GUILD_MEMBER_ADD (Member_j.t_of_string contents) | "GUILD_MEMBER_REMOVE" -> GUILD_MEMBER_REMOVE (Member_j.t_of_string contents) | "GUILD_MEMBER_UPDATE" -> GUILD_MEMBER_UPDATE (Member_j.t_of_string contents) - (* | "GUILD_MEMBERS_CHUNK" -> GUILD_MEMBERS_CHUNK (Yojson.Safe.Util.to_list contents |> List.map ~f:(fun m -> Member_j.t_of_string m)) *) + | "GUILD_MEMBERS_CHUNK" -> GUILD_MEMBERS_CHUNK (Yojson.Safe.(from_string contents |> Util.to_list) |> List.map ~f:(fun m -> Yojson.Safe.to_string m |> Member_j.t_of_string)) | "GUILD_ROLE_CREATE" -> GUILD_ROLE_CREATE (Role_j.t_of_string contents) | "GUILD_ROLE_UPDATE" -> GUILD_ROLE_UPDATE (Role_j.t_of_string contents) | "GUILD_ROLE_DELETE" -> GUILD_ROLE_DELETE (Role_j.t_of_string contents) | "MESSAGE_CREATE" -> MESSAGE_CREATE (Message_j.t_of_string contents) | "MESSAGE_UPDATE" -> MESSAGE_UPDATE (Message_j.t_of_string contents) | "MESSAGE_DELETE" -> MESSAGE_DELETE (Message_j.t_of_string contents) - (* | "MESSAGE_BULK_DELETE" -> MESSAGE_BULK_DELETE (Yojson.Safe.Util.to_list contents |> List.map ~f:(fun m -> Message_j.t_of_string m)) *) + | "MESSAGE_BULK_DELETE" -> MESSAGE_BULK_DELETE (Yojson.Safe.(from_string contents |> Util.to_list) |> List.map ~f:(fun m -> Yojson.Safe.to_string m |> Message_j.t_of_string)) | "MESSAGE_REACTION_ADD" -> MESSAGE_REACTION_ADD (Reaction_j.t_of_string contents) | "MESSAGE_REACTION_REMOVE" -> MESSAGE_REACTION_REMOVE (Reaction_j.t_of_string contents) - (* | "MESSAGE_REACTION_REMOVE_ALL" -> MESSAGE_REACTION_REMOVE_ALL (Yojson.Safe.Util.to_list contents |> List.map ~f:(fun r -> Reaction_j.t_of_string r)) *) + | "MESSAGE_REACTION_REMOVE_ALL" -> MESSAGE_REACTION_REMOVE_ALL (Yojson.Safe.(from_string contents |> Util.to_list) |> List.map ~f:(fun m -> Yojson.Safe.to_string m |> Reaction_j.t_of_string)) | "PRESENCE_UPDATE" -> PRESENCE_UPDATE (Presence_j.t_of_string contents) | "TYPING_START" -> TYPING_START (Yojson.Safe.from_string contents) | "USER_UPDATE" -> USER_UPDATE (Yojson.Safe.from_string contents) |