aboutsummaryrefslogtreecommitdiff
path: root/lib/models/message.atd
diff options
context:
space:
mode:
authorAdelyn Breelove <[email protected]>2018-12-13 14:11:54 -0700
committerAdelyn Breelove <[email protected]>2018-12-13 14:11:54 -0700
commit73d115ce6260e97f5f7ee47f743d842ffd292662 (patch)
tree7825358ae1b4736392909cb72ce26cdb26257d23 /lib/models/message.atd
parentAdd rate limit handling (diff)
downloaddisml-73d115ce6260e97f5f7ee47f743d842ffd292662.tar.xz
disml-73d115ce6260e97f5f7ee47f743d842ffd292662.zip
Working on deriving types from json
Diffstat (limited to 'lib/models/message.atd')
-rw-r--r--lib/models/message.atd29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/models/message.atd b/lib/models/message.atd
new file mode 100644
index 0000000..88c60ec
--- /dev/null
+++ b/lib/models/message.atd
@@ -0,0 +1,29 @@
+type snowflake <ocaml from="Snowflake" t="t"> = abstract
+type user <ocaml from="User" t="t"> = abstract
+type member <ocaml from="Member" t="t"> = abstract
+type role <ocaml from="Role" t="t"> = abstract
+type attachment <ocaml from="Attachment" t="t"> = abstract
+type embed <ocaml from="Embed" t="t"> = abstract
+type reaction <ocaml from="Reaction" t="t"> = abstract
+
+type t = {
+ id: snowflake;
+ author: user;
+ channel_id: snowflake;
+ ?member: member option;
+ ?guild_id: snowflake option;
+ content: string;
+ timestamp: string;
+ ?edited_timestamp: string option;
+ tts: bool;
+ mention_everyone: bool;
+ mentions: user list;
+ role_mentions: role list;
+ attachments: attachment list;
+ embeds: embed list;
+ reactions: reaction list;
+ ?nonce: snowflake option;
+ pinned: bool;
+ webhook_id: snowflake;
+ kind <json name="type">: int;
+} \ No newline at end of file