From 73d115ce6260e97f5f7ee47f743d842ffd292662 Mon Sep 17 00:00:00 2001 From: Adelyn Breelove Date: Thu, 13 Dec 2018 14:11:54 -0700 Subject: Working on deriving types from json --- lib/models/message.atd | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 lib/models/message.atd (limited to 'lib/models/message.atd') 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 = abstract +type user = abstract +type member = abstract +type role = abstract +type attachment = abstract +type embed = abstract +type reaction = 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 : int; +} \ No newline at end of file -- cgit v1.2.3