diff options
| author | Adelyn Breelove <[email protected]> | 2018-12-20 16:03:27 -0700 |
|---|---|---|
| committer | Adelyn Breelove <[email protected]> | 2018-12-20 16:03:27 -0700 |
| commit | 9e3c97eb4f5d8a808844cb2e448371ce1cc150e1 (patch) | |
| tree | 2337d229ea595c25dbff88e1b100b91690b21ad4 /lib/channel.atd | |
| parent | Fix member abstraction and helper methods (diff) | |
| download | disml-9e3c97eb4f5d8a808844cb2e448371ce1cc150e1.tar.xz disml-9e3c97eb4f5d8a808844cb2e448371ce1cc150e1.zip | |
Working with Discord's channel bullshit
Diffstat (limited to 'lib/channel.atd')
| -rw-r--r-- | lib/channel.atd | 64 |
1 files changed, 62 insertions, 2 deletions
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 <ocaml from="Snowflake" t="t"> = abstract type user <ocaml from="User" t="t"> = 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 <json name="parent_id">: snowflake option; + guild_id: snowflake; + name: string; + position: int; + ?topic: string option; + nsfw: bool; + ?slow_mode_timeout <json name="rate_limit_per_user">: int option; +} + +type guild_voice = { + id: snowflake; + ?category_id <json name="parent_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 <json name="parent_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 <json name="type">: 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 <json name="parent_id">: snowflake option; + ?last_pin_timestamp: string option; }
\ No newline at end of file |