aboutsummaryrefslogtreecommitdiff
path: root/lib/models/channel/message/message_t.mli
blob: 097a705ee77f694ebc0fd277da4ee506b23305ec (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
(** Represents data sent on {{!Dispatch.member_update}member update} events. *)
type message_update = {
    id: Snowflake.t;
    author: User_t.t option;
    channel_id: Snowflake.t;
    member: Member_t.partial_member option;
    guild_id: Snowflake.t option;
    content: string option;
    timestamp: string option;
    editedimestamp: string option;
    tts: bool option;
    mention_everyone: bool option;
    mentions: Snowflake.t list;
    role_mentions: Snowflake.t list;
    attachments: Attachment.t list;
    embeds: Embed.t list;
    reactions: Snowflake.t list;
    nonce: Snowflake.t option;
    pinned: bool option;
    webhook_id: Snowflake.t option;
    kind: int option;
} [@@deriving sexp, yojson]

(** Represents a message object. *)
type t = {
    id: Snowflake.t;
    author: User_t.t;
    channel_id: Snowflake.t;
    member: Member_t.partial_member option;
    guild_id: Snowflake.t option;
    content: string;
    timestamp: string;
    editedimestamp: string option;
    tts: bool;
    mention_everyone: bool;
    (* mentions: Snowflake.t list; *)
    (* role_mentions: Snowflake.t list; *)
    attachments: Attachment.t list;
    embeds: Embed.t list;
    reactions: Snowflake.t list;
    nonce: Snowflake.t option;
    pinned: bool;
    webhook_id: Snowflake.t option;
    kind: int;
} [@@deriving sexp, yojson]