From 1a73007b3aaa17940173eaff1eb4f6703fd9ec0c Mon Sep 17 00:00:00 2001 From: Adelyn Breelove Date: Wed, 19 Dec 2018 13:44:04 -0700 Subject: Re-arrange autogen serialization files and incorporate into dune file --- lib/channel.atd | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lib/channel.atd (limited to 'lib/channel.atd') diff --git a/lib/channel.atd b/lib/channel.atd new file mode 100644 index 0000000..6ab58cf --- /dev/null +++ b/lib/channel.atd @@ -0,0 +1,19 @@ +type snowflake = abstract +type user = abstract + +type t = { + id: snowflake; + kind : int; + ?guild_id: snowflake option; + ?position: int option; + ?name: string option; + ?topic: string option; + ?nsfw: bool option; + ?bitrate: int option; + ?user_limit: int option; + ?recipients: user list option; + ?icon: string option; + ?owner_id: snowflake option; + ?application_id: snowflake option; + ?parent_id: snowflake option; +} \ No newline at end of file -- cgit v1.2.3 From 9e3c97eb4f5d8a808844cb2e448371ce1cc150e1 Mon Sep 17 00:00:00 2001 From: Adelyn Breelove Date: Thu, 20 Dec 2018 16:03:27 -0700 Subject: Working with Discord's channel bullshit --- lib/channel.atd | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 62 insertions(+), 2 deletions(-) (limited to 'lib/channel.atd') diff --git a/lib/channel.atd b/lib/channel.atd index 6ab58cf..4094ff1 100644 --- a/lib/channel.atd +++ b/lib/channel.atd @@ -1,7 +1,64 @@ type snowflake = abstract type user = abstract -type t = { +type group = { + id: snowflake; + ?last_message_id: snowflake option; + ?last_pin_timestamp: string option; + ?icon: string option; + ?name: string option; + owner_id: snowflake; + recipients: user list; +} + +type dm = { + id: snowflake; + ?last_message_id: snowflake option; + ?last_pin_timestamp: string option; +} + +type guild_text = { + id: snowflake; + ?last_message_id: snowflake option; + ?last_pin_timestamp: string option; + ?category_id : snowflake option; + guild_id: snowflake; + name: string; + position: int; + ?topic: string option; + nsfw: bool; + ?slow_mode_timeout : int option; +} + +type guild_voice = { + id: snowflake; + ?category_id : snowflake option; + guild_id: snowflake; + name: string; + position: int; + ?topic: string option; + nsfw: bool; + ?user_limit: int option; + ?bitrate: int option; +} + +type category = { + id: snowflake; + ?category_id : snowflake option; + position: int; + name: string; + nsfw: bool; +} + +type t = [ + Group of group + | Private of dm + | GuildText of guild_text + | GuildVoice of guild_voice + | Category of category +] + +type channel_wrapper = { id: snowflake; kind : int; ?guild_id: snowflake option; @@ -9,11 +66,14 @@ type t = { ?name: string option; ?topic: string option; ?nsfw: bool option; + ?last_message_id: snowflake option; ?bitrate: int option; ?user_limit: int option; + ?rate_limit_per_user: int option; ?recipients: user list option; ?icon: string option; ?owner_id: snowflake option; ?application_id: snowflake option; - ?parent_id: snowflake option; + ?category_id : snowflake option; + ?last_pin_timestamp: string option; } \ No newline at end of file -- cgit v1.2.3