diff options
| author | Adelyn Breedlove <[email protected]> | 2019-01-28 07:41:20 -0700 |
|---|---|---|
| committer | Adelyn Breedlove <[email protected]> | 2019-01-28 07:41:20 -0700 |
| commit | e48af10e04a4aea4eb72dac58b83fc7cc080e1bd (patch) | |
| tree | 78a0cf1f78855982ea54c78ac36f7fd89c5a1122 /lib | |
| parent | Switch to ID abstractions internally (diff) | |
| download | disml-e48af10e04a4aea4eb72dac58b83fc7cc080e1bd.tar.xz disml-e48af10e04a4aea4eb72dac58b83fc7cc080e1bd.zip | |
Fix Message.t.mentions
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/http.ml | 3 | ||||
| -rw-r--r-- | lib/models/channel/message/message_t.ml | 6 | ||||
| -rw-r--r-- | lib/models/channel/message/message_t.mli | 6 |
3 files changed, 7 insertions, 8 deletions
diff --git a/lib/http.ml b/lib/http.ml index 9799d7a..8927f47 100644 --- a/lib/http.ml +++ b/lib/http.ml @@ -4,7 +4,6 @@ open Cohttp module Base = struct exception Invalid_Method - exception Bad_response_headers let rl = ref Rl.empty @@ -30,7 +29,7 @@ module Base = struct (match Response.headers resp |> Rl.rl_of_header with | Some r -> Mvar.put (Rl.find_exn !rl path) r - | None -> raise Bad_response_headers) + | None -> return ()) >>= fun () -> match resp |> Response.status |> Code.code_of_status with | 200 -> body |> Cohttp_async.Body.to_string >>| Yojson.Safe.from_string >>= Deferred.Or_error.return diff --git a/lib/models/channel/message/message_t.ml b/lib/models/channel/message/message_t.ml index 20dc03f..3c2e736 100644 --- a/lib/models/channel/message/message_t.ml +++ b/lib/models/channel/message/message_t.ml @@ -8,11 +8,11 @@ type t = { guild_id: Guild_id_t.t option [@default None]; content: string; timestamp: string; - editedimestamp: string option [@default None]; + edited_timestamp: string option [@default None]; tts: bool; mention_everyone: bool; - mentions: User_id_t.t list [@default []]; - role_mentions: Role_id.t list [@default []]; + mentions: User_t.t list [@default []]; + mention_roles: Role_id.t list [@default []]; attachments: Attachment.t list [@default []]; embeds: Embed.t list [@default []]; reactions: Snowflake.t list [@default []]; diff --git a/lib/models/channel/message/message_t.mli b/lib/models/channel/message/message_t.mli index d829dc5..1f691b5 100644 --- a/lib/models/channel/message/message_t.mli +++ b/lib/models/channel/message/message_t.mli @@ -7,11 +7,11 @@ type t = { guild_id: Guild_id_t.t option; content: string; timestamp: string; - editedimestamp: string option; + edited_timestamp: string option; tts: bool; mention_everyone: bool; - mentions: User_id_t.t list; - role_mentions: Role_id.t list; + mentions: User_t.t list; + mention_roles: Role_id.t list; attachments: Attachment.t list; embeds: Embed.t list; reactions: Snowflake.t list; |