diff options
| author | Adelyn Breelove <[email protected]> | 2019-01-23 10:40:04 -0700 |
|---|---|---|
| committer | Adelyn Breelove <[email protected]> | 2019-01-23 10:40:04 -0700 |
| commit | f23a12be25f819b9cc9ae05829b14edb6807082f (patch) | |
| tree | e90bf9fa5a469c9707feccce9bf3926858c67f35 /lib/models/channel/channel_t.mli | |
| parent | fix a doc typo (diff) | |
| download | disml-f23a12be25f819b9cc9ae05829b14edb6807082f.tar.xz disml-f23a12be25f819b9cc9ae05829b14edb6807082f.zip | |
Guild ID and Channel ID abstractions
Diffstat (limited to 'lib/models/channel/channel_t.mli')
| -rw-r--r-- | lib/models/channel/channel_t.mli | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/models/channel/channel_t.mli b/lib/models/channel/channel_t.mli index 2ac66fb..f3974d4 100644 --- a/lib/models/channel/channel_t.mli +++ b/lib/models/channel/channel_t.mli @@ -1,5 +1,6 @@ exception Invalid_channel of Yojson.Safe.json +(** Represents a Group channel object. *) type group = { id: Snowflake.t; last_message_id: Snowflake.t option; @@ -10,12 +11,14 @@ type group = { recipients: User_t.t list; } [@@deriving sexp, yojson] +(** Represents a private channel with a single user. *) type dm = { id: Snowflake.t; last_message_id: Snowflake.t option; last_pin_timestamp: string option; } [@@deriving sexp, yojson] +(** Represents a text channel in a guild. *) type guild_text = { id: Snowflake.t; last_message_id: Snowflake.t option; @@ -29,6 +32,7 @@ type guild_text = { slow_mode_timeout: int option; } [@@deriving sexp, yojson] +(** Represents a voice channel in a guild. *) type guild_voice = { id: Snowflake.t; category_id: Snowflake.t option; @@ -39,6 +43,7 @@ type guild_voice = { bitrate: int option; } [@@deriving sexp, yojson] +(** Represents a guild category. *) type category = { id: Snowflake.t; guild_id: Snowflake.t option; @@ -46,6 +51,7 @@ type category = { name: string; } [@@deriving sexp, yojson] +(** Wrapper variant for all channel types. *) type t = | Group of group | Private of dm @@ -54,6 +60,7 @@ type t = | Category of category [@@deriving sexp, yojson] +(** Intermediate used internally. *) type channel_wrapper = { id: Snowflake.t; kind: int; |