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