From ee77e43ac06098f6877bf7b3db736b95a56c1be1 Mon Sep 17 00:00:00 2001 From: Adelyn Breedlove Date: Mon, 21 Jan 2019 20:17:21 -0700 Subject: Docs! --- docs/disml/Disml/Activity/index.html | 2 +- docs/disml/Disml/Attachment/index.html | 2 +- docs/disml/Disml/Ban/index.html | 2 +- docs/disml/Disml/Ban_t/index.html | 2 +- docs/disml/Disml/Channel/index.html | 10 +++++++++- docs/disml/Disml/Channel_t/index.html | 2 +- docs/disml/Disml/Client/index.html | 17 ++++++++++++++++- docs/disml/Disml/Client_options/index.html | 2 +- docs/disml/Disml/Dispatch/index.html | 9 ++++++++- docs/disml/Disml/Embed/index.html | 2 +- docs/disml/Disml/Emoji/index.html | 2 +- docs/disml/Disml/Endpoints/index.html | 2 +- docs/disml/Disml/Event/index.html | 2 +- docs/disml/Disml/Guild/index.html | 2 +- docs/disml/Disml/Guild_t/index.html | 2 +- docs/disml/Disml/Member/index.html | 2 +- docs/disml/Disml/Member_t/index.html | 2 +- docs/disml/Disml/Message/index.html | 2 +- docs/disml/Disml/Message_t/index.html | 2 +- docs/disml/Disml/Opcode/index.html | 2 +- docs/disml/Disml/Presence/index.html | 2 +- docs/disml/Disml/Reaction/index.html | 2 +- docs/disml/Disml/Reaction_t/index.html | 2 +- docs/disml/Disml/Rl/RouteMap/index.html | 2 +- docs/disml/Disml/Rl/index.html | 2 +- docs/disml/Disml/Role/index.html | 2 +- docs/disml/Disml/Role_t/index.html | 2 +- docs/disml/Disml/Sharder/Shard/index.html | 2 +- docs/disml/Disml/Sharder/index.html | 2 +- docs/disml/Disml/Snowflake/index.html | 2 +- docs/disml/Disml/User/index.html | 2 +- docs/disml/Disml/User_t/index.html | 2 +- docs/disml/Disml__Activity/index.html | 2 +- docs/disml/Disml__Attachment/index.html | 2 +- docs/disml/Disml__Ban/index.html | 2 +- docs/disml/Disml__Ban_t/index.html | 2 +- docs/disml/Disml__Channel/index.html | 10 +++++++++- docs/disml/Disml__Channel_t/index.html | 2 +- docs/disml/Disml__Client/index.html | 17 ++++++++++++++++- docs/disml/Disml__Client_options/index.html | 2 +- docs/disml/Disml__Dispatch/index.html | 9 ++++++++- docs/disml/Disml__Embed/index.html | 2 +- docs/disml/Disml__Emoji/index.html | 2 +- docs/disml/Disml__Endpoints/index.html | 2 +- docs/disml/Disml__Event/index.html | 2 +- docs/disml/Disml__Guild/index.html | 2 +- docs/disml/Disml__Guild_t/index.html | 2 +- docs/disml/Disml__Member/index.html | 2 +- docs/disml/Disml__Member_t/index.html | 2 +- docs/disml/Disml__Message/index.html | 2 +- docs/disml/Disml__Message_t/index.html | 2 +- docs/disml/Disml__Opcode/index.html | 2 +- docs/disml/Disml__Presence/index.html | 2 +- docs/disml/Disml__Reaction/index.html | 2 +- docs/disml/Disml__Reaction_t/index.html | 2 +- docs/disml/Disml__Rl/RouteMap/index.html | 2 +- docs/disml/Disml__Rl/index.html | 2 +- docs/disml/Disml__Role/index.html | 2 +- docs/disml/Disml__Role_t/index.html | 2 +- docs/disml/Disml__Sharder/Shard/index.html | 2 +- docs/disml/Disml__Sharder/index.html | 2 +- docs/disml/Disml__Snowflake/index.html | 2 +- docs/disml/Disml__User/index.html | 2 +- docs/disml/Disml__User_t/index.html | 2 +- lib/sharder.mli | 25 ++++++++++++++++++++++++- 65 files changed, 148 insertions(+), 65 deletions(-) diff --git a/docs/disml/Disml/Activity/index.html b/docs/disml/Disml/Activity/index.html index 62e019f..565f0d7 100644 --- a/docs/disml/Disml/Activity/index.html +++ b/docs/disml/Disml/Activity/index.html @@ -1,2 +1,2 @@ -Activity (disml.Disml.Activity)

Module Disml.Activity

type t = {
name : string;
kind : int;
url : string;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
\ No newline at end of file +Activity (disml.Disml.Activity)

Module Disml.Activity

type t = {
name : string;
kind : int;
url : string;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
\ No newline at end of file diff --git a/docs/disml/Disml/Attachment/index.html b/docs/disml/Disml/Attachment/index.html index 10671ce..9c34c9f 100644 --- a/docs/disml/Disml/Attachment/index.html +++ b/docs/disml/Disml/Attachment/index.html @@ -1,2 +1,2 @@ -Attachment (disml.Disml.Attachment)

Module Disml.Attachment

type t = {
id : Snowflake.t;
filename : string;
size : int;
url : string;
proxy_url : string;
height : int;
width : int;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
\ No newline at end of file +Attachment (disml.Disml.Attachment)

Module Disml.Attachment

type t = {
id : Snowflake.t;
filename : string;
size : int;
url : string;
proxy_url : string;
height : int;
width : int;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
\ No newline at end of file diff --git a/docs/disml/Disml/Ban/index.html b/docs/disml/Disml/Ban/index.html index 87cd017..4894f28 100644 --- a/docs/disml/Disml/Ban/index.html +++ b/docs/disml/Disml/Ban/index.html @@ -1,2 +1,2 @@ -Ban (disml.Disml.Ban)

Module Disml.Ban

include module type of Ban_t
type t = {
reason : string;
user : User_t.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
\ No newline at end of file +Ban (disml.Disml.Ban)

Module Disml.Ban

include module type of Ban_t
type t = {
reason : string;
user : User_t.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
\ No newline at end of file diff --git a/docs/disml/Disml/Ban_t/index.html b/docs/disml/Disml/Ban_t/index.html index 0a5319b..b6b6c30 100644 --- a/docs/disml/Disml/Ban_t/index.html +++ b/docs/disml/Disml/Ban_t/index.html @@ -1,2 +1,2 @@ -Ban_t (disml.Disml.Ban_t)

Module Disml.Ban_t

type t = {
reason : string;
user : User_t.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
\ No newline at end of file +Ban_t (disml.Disml.Ban_t)

Module Disml.Ban_t

type t = {
reason : string;
user : User_t.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
\ No newline at end of file diff --git a/docs/disml/Disml/Channel/index.html b/docs/disml/Disml/Channel/index.html index 188a973..8cc6188 100644 --- a/docs/disml/Disml/Channel/index.html +++ b/docs/disml/Disml/Channel/index.html @@ -1,2 +1,10 @@ -Channel (disml.Disml.Channel)

Module Disml.Channel

include module type of Channel_t
exception Invalid_channel of Yojson.Safe.json
type group = {
id : Snowflake.t;
last_message_id : Snowflake.t option;
last_pin_timestamp : string option;
icon : string option;
name : string option;
owner_id : Snowflake.t;
recipients : User_t.t list;
}
val group_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> group
val sexp_of_group : group -> Ppx_sexp_conv_lib.Sexp.t
val group_to_yojson : group -> Yojson.Safe.json
val group_of_yojson : Yojson.Safe.json -> group Ppx_deriving_yojson_runtime.error_or
val _ : group -> Yojson.Safe.json
val _ : Yojson.Safe.json -> group Ppx_deriving_yojson_runtime.error_or
val group_of_yojson_exn : Yojson.Safe.json -> group
val _ : Yojson.Safe.json -> group
type dm = {
id : Snowflake.t;
last_message_id : Snowflake.t option;
last_pin_timestamp : string option;
}
val dm_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> dm
val sexp_of_dm : dm -> Ppx_sexp_conv_lib.Sexp.t
val dm_to_yojson : dm -> Yojson.Safe.json
val dm_of_yojson : Yojson.Safe.json -> dm Ppx_deriving_yojson_runtime.error_or
val _ : dm -> Yojson.Safe.json
val _ : Yojson.Safe.json -> dm Ppx_deriving_yojson_runtime.error_or
val dm_of_yojson_exn : Yojson.Safe.json -> dm
val _ : Yojson.Safe.json -> dm
type guild_text = {
id : Snowflake.t;
last_message_id : Snowflake.t option;
last_pin_timestamp : string option;
category_id : Snowflake.t option;
guild_id : Snowflake.t option;
name : string;
position : int;
topic : string option;
nsfw : bool;
slow_mode_timeout : int option;
}
val guild_text_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> guild_text
val sexp_of_guild_text : guild_text -> Ppx_sexp_conv_lib.Sexp.t
val guild_text_to_yojson : guild_text -> Yojson.Safe.json
val guild_text_of_yojson : Yojson.Safe.json -> guild_text Ppx_deriving_yojson_runtime.error_or
val _ : guild_text -> Yojson.Safe.json
val _ : Yojson.Safe.json -> guild_text Ppx_deriving_yojson_runtime.error_or
val guild_text_of_yojson_exn : Yojson.Safe.json -> guild_text
val _ : Yojson.Safe.json -> guild_text
type guild_voice = {
id : Snowflake.t;
category_id : Snowflake.t option;
guild_id : Snowflake.t option;
name : string;
position : int;
user_limit : int;
bitrate : int option;
}
val guild_voice_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> guild_voice
val sexp_of_guild_voice : guild_voice -> Ppx_sexp_conv_lib.Sexp.t
val guild_voice_to_yojson : guild_voice -> Yojson.Safe.json
val guild_voice_of_yojson : Yojson.Safe.json -> guild_voice Ppx_deriving_yojson_runtime.error_or
val _ : guild_voice -> Yojson.Safe.json
val _ : Yojson.Safe.json -> guild_voice Ppx_deriving_yojson_runtime.error_or
val guild_voice_of_yojson_exn : Yojson.Safe.json -> guild_voice
val _ : Yojson.Safe.json -> guild_voice
type category = {
id : Snowflake.t;
guild_id : Snowflake.t option;
position : int;
name : string;
}
val category_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> category
val sexp_of_category : category -> Ppx_sexp_conv_lib.Sexp.t
val category_to_yojson : category -> Yojson.Safe.json
val category_of_yojson : Yojson.Safe.json -> category Ppx_deriving_yojson_runtime.error_or
val _ : category -> Yojson.Safe.json
val _ : Yojson.Safe.json -> category Ppx_deriving_yojson_runtime.error_or
val category_of_yojson_exn : Yojson.Safe.json -> category
val _ : Yojson.Safe.json -> category
type t =
| Group of group
| Private of dm
| GuildText of guild_text
| GuildVoice of guild_voice
| Category of category
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
type channel_wrapper = {
id : Snowflake.t;
kind : int;
guild_id : Snowflake.t option;
position : int option;
name : string option;
topic : string option;
nsfw : bool option;
last_message_id : Snowflake.t option;
bitrate : int option;
user_limit : int option;
slow_mode_timeout : int option;
recipients : User_t.t list option;
icon : string option;
owner_id : Snowflake.t option;
application_id : Snowflake.t option;
category_id : Snowflake.t option;
last_pin_timestamp : string option;
}
val channel_wrapper_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> channel_wrapper
val sexp_of_channel_wrapper : channel_wrapper -> Ppx_sexp_conv_lib.Sexp.t
val channel_wrapper_to_yojson : channel_wrapper -> Yojson.Safe.json
val channel_wrapper_of_yojson : Yojson.Safe.json -> channel_wrapper Ppx_deriving_yojson_runtime.error_or
val _ : channel_wrapper -> Yojson.Safe.json
val _ : Yojson.Safe.json -> channel_wrapper Ppx_deriving_yojson_runtime.error_or
val channel_wrapper_of_yojson_exn : Yojson.Safe.json -> channel_wrapper
val _ : Yojson.Safe.json -> channel_wrapper
val unwrap_as_guild_text : channel_wrapper -> guild_text
val unwrap_as_guild_voice : channel_wrapper -> guild_voice
val unwrap_as_dm : channel_wrapper -> dm
val unwrap_as_group : channel_wrapper -> group
val unwrap_as_category : channel_wrapper -> category
val wrap : channel_wrapper -> t
val get_id : t -> Snowflake.t
val say : content:string -> t -> Message_t.t Async.Deferred.Or_error.t
val send_message : ?⁠embed:Yojson.Safe.json -> ?⁠content:string -> ?⁠file:string -> ?⁠tts:bool -> t -> Message_t.t Async.Deferred.Or_error.t
val delete : t -> unit Async.Deferred.Or_error.t
val get_message : id:Snowflake.t -> t -> Message_t.t Async.Deferred.Or_error.t
val get_messages : ?⁠mode:[ `Before | `After | `Around ] -> ?⁠id:Snowflake.t -> ?⁠limit:int -> t -> Message_t.t list Async.Deferred.Or_error.t
val broadcast_typing : t -> unit Async.Deferred.Or_error.t
val get_pins : t -> Message_t.t list Async.Deferred.Or_error.t
\ No newline at end of file +Channel (disml.Disml.Channel)

Module Disml.Channel

include module type of Channel_t
exception Invalid_channel of Yojson.Safe.json
type group = {
id : Snowflake.t;
last_message_id : Snowflake.t option;
last_pin_timestamp : string option;
icon : string option;
name : string option;
owner_id : Snowflake.t;
recipients : User_t.t list;
}
val group_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> group
val sexp_of_group : group -> Ppx_sexp_conv_lib.Sexp.t
val group_to_yojson : group -> Yojson.Safe.json
val group_of_yojson : Yojson.Safe.json -> group Ppx_deriving_yojson_runtime.error_or
val group_of_yojson_exn : Yojson.Safe.json -> group
type dm = {
id : Snowflake.t;
last_message_id : Snowflake.t option;
last_pin_timestamp : string option;
}
val dm_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> dm
val sexp_of_dm : dm -> Ppx_sexp_conv_lib.Sexp.t
val dm_to_yojson : dm -> Yojson.Safe.json
val dm_of_yojson : Yojson.Safe.json -> dm Ppx_deriving_yojson_runtime.error_or
val dm_of_yojson_exn : Yojson.Safe.json -> dm
type guild_text = {
id : Snowflake.t;
last_message_id : Snowflake.t option;
last_pin_timestamp : string option;
category_id : Snowflake.t option;
guild_id : Snowflake.t option;
name : string;
position : int;
topic : string option;
nsfw : bool;
slow_mode_timeout : int option;
}
val guild_text_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> guild_text
val sexp_of_guild_text : guild_text -> Ppx_sexp_conv_lib.Sexp.t
val guild_text_to_yojson : guild_text -> Yojson.Safe.json
val guild_text_of_yojson : Yojson.Safe.json -> guild_text Ppx_deriving_yojson_runtime.error_or
val guild_text_of_yojson_exn : Yojson.Safe.json -> guild_text
type guild_voice = {
id : Snowflake.t;
category_id : Snowflake.t option;
guild_id : Snowflake.t option;
name : string;
position : int;
user_limit : int;
bitrate : int option;
}
val guild_voice_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> guild_voice
val sexp_of_guild_voice : guild_voice -> Ppx_sexp_conv_lib.Sexp.t
val guild_voice_to_yojson : guild_voice -> Yojson.Safe.json
val guild_voice_of_yojson : Yojson.Safe.json -> guild_voice Ppx_deriving_yojson_runtime.error_or
val guild_voice_of_yojson_exn : Yojson.Safe.json -> guild_voice
type category = {
id : Snowflake.t;
guild_id : Snowflake.t option;
position : int;
name : string;
}
val category_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> category
val sexp_of_category : category -> Ppx_sexp_conv_lib.Sexp.t
val category_to_yojson : category -> Yojson.Safe.json
val category_of_yojson : Yojson.Safe.json -> category Ppx_deriving_yojson_runtime.error_or
val category_of_yojson_exn : Yojson.Safe.json -> category
type t =
| Group of group
| Private of dm
| GuildText of guild_text
| GuildVoice of guild_voice
| Category of category
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
type channel_wrapper = {
id : Snowflake.t;
kind : int;
guild_id : Snowflake.t option;
position : int option;
name : string option;
topic : string option;
nsfw : bool option;
last_message_id : Snowflake.t option;
bitrate : int option;
user_limit : int option;
slow_mode_timeout : int option;
recipients : User_t.t list option;
icon : string option;
owner_id : Snowflake.t option;
application_id : Snowflake.t option;
category_id : Snowflake.t option;
last_pin_timestamp : string option;
}
val channel_wrapper_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> channel_wrapper
val sexp_of_channel_wrapper : channel_wrapper -> Ppx_sexp_conv_lib.Sexp.t
val channel_wrapper_to_yojson : channel_wrapper -> Yojson.Safe.json
val channel_wrapper_of_yojson : Yojson.Safe.json -> channel_wrapper Ppx_deriving_yojson_runtime.error_or
val channel_wrapper_of_yojson_exn : Yojson.Safe.json -> channel_wrapper
val unwrap_as_guild_text : channel_wrapper -> guild_text
val unwrap_as_guild_voice : channel_wrapper -> guild_voice
val unwrap_as_dm : channel_wrapper -> dm
val unwrap_as_group : channel_wrapper -> group
val unwrap_as_category : channel_wrapper -> category
val wrap : channel_wrapper -> t
val get_id : t -> Snowflake.t
exception Invalid_message
exception No_message_found
val say : content:string -> t -> Message_t.t Async.Deferred.Or_error.t

Simple version of send_message that only takes ~content

val send_message : ?⁠embed:Embed.t -> ?⁠content:string -> ?⁠file:string -> ?⁠tts:bool -> t -> Message_t.t Async.Deferred.Or_error.t

Advanced message sending.

Raises Channel.Invalid_message if one of content or embed is not set.

Examples

open Core
+open Disml
+
+let check_command (msg : Message.t) =
+    if String.is_prefix ~prefix:"!hello" msg.content then
+        let embed = { Embed.default with title = Some "Hello World!" } in
+        Channel.send_message ~embed msg.channel >>> ignore
+
+Client.message_create := check_command
val delete : t -> unit Async.Deferred.Or_error.t
val get_message : id:Snowflake.t -> t -> Message_t.t Async.Deferred.Or_error.t
val get_messages : ?⁠mode:[ `Before | `After | `Around ] -> ?⁠id:Snowflake.t -> ?⁠limit:int -> t -> Message_t.t list Async.Deferred.Or_error.t
val broadcast_typing : t -> unit Async.Deferred.Or_error.t
val get_pins : t -> Message_t.t list Async.Deferred.Or_error.t
\ No newline at end of file diff --git a/docs/disml/Disml/Channel_t/index.html b/docs/disml/Disml/Channel_t/index.html index a928536..edfdad8 100644 --- a/docs/disml/Disml/Channel_t/index.html +++ b/docs/disml/Disml/Channel_t/index.html @@ -1,2 +1,2 @@ -Channel_t (disml.Disml.Channel_t)

Module Disml.Channel_t

exception Invalid_channel of Yojson.Safe.json
type group = {
id : Snowflake.t;
last_message_id : Snowflake.t option;
last_pin_timestamp : string option;
icon : string option;
name : string option;
owner_id : Snowflake.t;
recipients : User_t.t list;
}
val group_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> group
val sexp_of_group : group -> Ppx_sexp_conv_lib.Sexp.t
val group_to_yojson : group -> Yojson.Safe.json
val group_of_yojson : Yojson.Safe.json -> group Ppx_deriving_yojson_runtime.error_or
val _ : group -> Yojson.Safe.json
val _ : Yojson.Safe.json -> group Ppx_deriving_yojson_runtime.error_or
val group_of_yojson_exn : Yojson.Safe.json -> group
val _ : Yojson.Safe.json -> group
type dm = {
id : Snowflake.t;
last_message_id : Snowflake.t option;
last_pin_timestamp : string option;
}
val dm_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> dm
val sexp_of_dm : dm -> Ppx_sexp_conv_lib.Sexp.t
val dm_to_yojson : dm -> Yojson.Safe.json
val dm_of_yojson : Yojson.Safe.json -> dm Ppx_deriving_yojson_runtime.error_or
val _ : dm -> Yojson.Safe.json
val _ : Yojson.Safe.json -> dm Ppx_deriving_yojson_runtime.error_or
val dm_of_yojson_exn : Yojson.Safe.json -> dm
val _ : Yojson.Safe.json -> dm
type guild_text = {
id : Snowflake.t;
last_message_id : Snowflake.t option;
last_pin_timestamp : string option;
category_id : Snowflake.t option;
guild_id : Snowflake.t option;
name : string;
position : int;
topic : string option;
nsfw : bool;
slow_mode_timeout : int option;
}
val guild_text_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> guild_text
val sexp_of_guild_text : guild_text -> Ppx_sexp_conv_lib.Sexp.t
val guild_text_to_yojson : guild_text -> Yojson.Safe.json
val guild_text_of_yojson : Yojson.Safe.json -> guild_text Ppx_deriving_yojson_runtime.error_or
val _ : guild_text -> Yojson.Safe.json
val _ : Yojson.Safe.json -> guild_text Ppx_deriving_yojson_runtime.error_or
val guild_text_of_yojson_exn : Yojson.Safe.json -> guild_text
val _ : Yojson.Safe.json -> guild_text
type guild_voice = {
id : Snowflake.t;
category_id : Snowflake.t option;
guild_id : Snowflake.t option;
name : string;
position : int;
user_limit : int;
bitrate : int option;
}
val guild_voice_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> guild_voice
val sexp_of_guild_voice : guild_voice -> Ppx_sexp_conv_lib.Sexp.t
val guild_voice_to_yojson : guild_voice -> Yojson.Safe.json
val guild_voice_of_yojson : Yojson.Safe.json -> guild_voice Ppx_deriving_yojson_runtime.error_or
val _ : guild_voice -> Yojson.Safe.json
val _ : Yojson.Safe.json -> guild_voice Ppx_deriving_yojson_runtime.error_or
val guild_voice_of_yojson_exn : Yojson.Safe.json -> guild_voice
val _ : Yojson.Safe.json -> guild_voice
type category = {
id : Snowflake.t;
guild_id : Snowflake.t option;
position : int;
name : string;
}
val category_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> category
val sexp_of_category : category -> Ppx_sexp_conv_lib.Sexp.t
val category_to_yojson : category -> Yojson.Safe.json
val category_of_yojson : Yojson.Safe.json -> category Ppx_deriving_yojson_runtime.error_or
val _ : category -> Yojson.Safe.json
val _ : Yojson.Safe.json -> category Ppx_deriving_yojson_runtime.error_or
val category_of_yojson_exn : Yojson.Safe.json -> category
val _ : Yojson.Safe.json -> category
type t =
| Group of group
| Private of dm
| GuildText of guild_text
| GuildVoice of guild_voice
| Category of category
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
type channel_wrapper = {
id : Snowflake.t;
kind : int;
guild_id : Snowflake.t option;
position : int option;
name : string option;
topic : string option;
nsfw : bool option;
last_message_id : Snowflake.t option;
bitrate : int option;
user_limit : int option;
slow_mode_timeout : int option;
recipients : User_t.t list option;
icon : string option;
owner_id : Snowflake.t option;
application_id : Snowflake.t option;
category_id : Snowflake.t option;
last_pin_timestamp : string option;
}
val channel_wrapper_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> channel_wrapper
val sexp_of_channel_wrapper : channel_wrapper -> Ppx_sexp_conv_lib.Sexp.t
val channel_wrapper_to_yojson : channel_wrapper -> Yojson.Safe.json
val channel_wrapper_of_yojson : Yojson.Safe.json -> channel_wrapper Ppx_deriving_yojson_runtime.error_or
val _ : channel_wrapper -> Yojson.Safe.json
val _ : Yojson.Safe.json -> channel_wrapper Ppx_deriving_yojson_runtime.error_or
val channel_wrapper_of_yojson_exn : Yojson.Safe.json -> channel_wrapper
val _ : Yojson.Safe.json -> channel_wrapper
val unwrap_as_guild_text : channel_wrapper -> guild_text
val unwrap_as_guild_voice : channel_wrapper -> guild_voice
val unwrap_as_dm : channel_wrapper -> dm
val unwrap_as_group : channel_wrapper -> group
val unwrap_as_category : channel_wrapper -> category
val wrap : channel_wrapper -> t
val get_id : t -> Snowflake.t
\ No newline at end of file +Channel_t (disml.Disml.Channel_t)

Module Disml.Channel_t

exception Invalid_channel of Yojson.Safe.json
type group = {
id : Snowflake.t;
last_message_id : Snowflake.t option;
last_pin_timestamp : string option;
icon : string option;
name : string option;
owner_id : Snowflake.t;
recipients : User_t.t list;
}
val group_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> group
val sexp_of_group : group -> Ppx_sexp_conv_lib.Sexp.t
val group_to_yojson : group -> Yojson.Safe.json
val group_of_yojson : Yojson.Safe.json -> group Ppx_deriving_yojson_runtime.error_or
val group_of_yojson_exn : Yojson.Safe.json -> group
type dm = {
id : Snowflake.t;
last_message_id : Snowflake.t option;
last_pin_timestamp : string option;
}
val dm_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> dm
val sexp_of_dm : dm -> Ppx_sexp_conv_lib.Sexp.t
val dm_to_yojson : dm -> Yojson.Safe.json
val dm_of_yojson : Yojson.Safe.json -> dm Ppx_deriving_yojson_runtime.error_or
val dm_of_yojson_exn : Yojson.Safe.json -> dm
type guild_text = {
id : Snowflake.t;
last_message_id : Snowflake.t option;
last_pin_timestamp : string option;
category_id : Snowflake.t option;
guild_id : Snowflake.t option;
name : string;
position : int;
topic : string option;
nsfw : bool;
slow_mode_timeout : int option;
}
val guild_text_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> guild_text
val sexp_of_guild_text : guild_text -> Ppx_sexp_conv_lib.Sexp.t
val guild_text_to_yojson : guild_text -> Yojson.Safe.json
val guild_text_of_yojson : Yojson.Safe.json -> guild_text Ppx_deriving_yojson_runtime.error_or
val guild_text_of_yojson_exn : Yojson.Safe.json -> guild_text
type guild_voice = {
id : Snowflake.t;
category_id : Snowflake.t option;
guild_id : Snowflake.t option;
name : string;
position : int;
user_limit : int;
bitrate : int option;
}
val guild_voice_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> guild_voice
val sexp_of_guild_voice : guild_voice -> Ppx_sexp_conv_lib.Sexp.t
val guild_voice_to_yojson : guild_voice -> Yojson.Safe.json
val guild_voice_of_yojson : Yojson.Safe.json -> guild_voice Ppx_deriving_yojson_runtime.error_or
val guild_voice_of_yojson_exn : Yojson.Safe.json -> guild_voice
type category = {
id : Snowflake.t;
guild_id : Snowflake.t option;
position : int;
name : string;
}
val category_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> category
val sexp_of_category : category -> Ppx_sexp_conv_lib.Sexp.t
val category_to_yojson : category -> Yojson.Safe.json
val category_of_yojson : Yojson.Safe.json -> category Ppx_deriving_yojson_runtime.error_or
val category_of_yojson_exn : Yojson.Safe.json -> category
type t =
| Group of group
| Private of dm
| GuildText of guild_text
| GuildVoice of guild_voice
| Category of category
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
type channel_wrapper = {
id : Snowflake.t;
kind : int;
guild_id : Snowflake.t option;
position : int option;
name : string option;
topic : string option;
nsfw : bool option;
last_message_id : Snowflake.t option;
bitrate : int option;
user_limit : int option;
slow_mode_timeout : int option;
recipients : User_t.t list option;
icon : string option;
owner_id : Snowflake.t option;
application_id : Snowflake.t option;
category_id : Snowflake.t option;
last_pin_timestamp : string option;
}
val channel_wrapper_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> channel_wrapper
val sexp_of_channel_wrapper : channel_wrapper -> Ppx_sexp_conv_lib.Sexp.t
val channel_wrapper_to_yojson : channel_wrapper -> Yojson.Safe.json
val channel_wrapper_of_yojson : Yojson.Safe.json -> channel_wrapper Ppx_deriving_yojson_runtime.error_or
val channel_wrapper_of_yojson_exn : Yojson.Safe.json -> channel_wrapper
val unwrap_as_guild_text : channel_wrapper -> guild_text
val unwrap_as_guild_voice : channel_wrapper -> guild_voice
val unwrap_as_dm : channel_wrapper -> dm
val unwrap_as_group : channel_wrapper -> group
val unwrap_as_category : channel_wrapper -> category
val wrap : channel_wrapper -> t
val get_id : t -> Snowflake.t
\ No newline at end of file diff --git a/docs/disml/Disml/Client/index.html b/docs/disml/Disml/Client/index.html index d65d400..cc21a97 100644 --- a/docs/disml/Disml/Client/index.html +++ b/docs/disml/Disml/Client/index.html @@ -1,2 +1,17 @@ -Client (disml.Disml.Client)

Module Disml.Client

include Client_options
val token : string Stdlib.ref
include Dispatch
val hello : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when connecting to the gateway, most users will have no use for this.

val ready : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when each shard receives READY from discord after identifying on the gateway. Other event dispatch is received after this.

val resumed : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when successfully reconnecting to the gateway.

val invalid_session : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when Discord decides a session is invalid, much like Client.hello this is not very useful for most people.

val channel_create : (Channel_t.t -> unit) Stdlib.ref

Dispatched when a channel is created which is visible to the bot.

val channel_update : (Channel_t.t -> unit) Stdlib.ref

Dispatched when a channel visible to the bot is changed.

val channel_delete : (Channel_t.t -> unit) Stdlib.ref

Dispatched when a channel visible to the bot is deleted.

val channel_pins_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when messages are pinned or unpinned from a a channel.

val guild_create : (Guild_t.t -> unit) Stdlib.ref

Dispatched when the bot joins a guild, and during startup.

val guild_update : (Guild_t.t -> unit) Stdlib.ref

Dispatched when a guild the bot is in is edited.

val guild_delete : (Guild_t.t -> unit) Stdlib.ref

Dispatched when the bot is removed from a guild.

val member_ban : (Ban_t.t -> unit) Stdlib.ref

Dispatched when a member is banned.

val member_unban : (Ban_t.t -> unit) Stdlib.ref

Dispatched when a member is unbanned.

val guild_emojis_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when emojis are added or removed from a guild.

val integrations_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when a guild's integrations are updated.

val member_join : (Member_t.t -> unit) Stdlib.ref

Dispatched when a member joins a guild.

val member_leave : (Member_t.member_wrapper -> unit) Stdlib.ref

Dispatched when a member leaves a guild. Is Dispatched alongside Client.member_ban when a user is banned.

val member_update : (Member_t.member_update -> unit) Stdlib.ref

Dispatched when a member object is updated.

val members_chunk : (Member_t.t list -> unit) Stdlib.ref

Dispatched when requesting guild members through Client.request_guild_members

val role_create : (Role_t.t -> unit) Stdlib.ref

Dispatched when a role is created.

val role_update : (Role_t.t -> unit) Stdlib.ref

Dispatched when a role is edited.

val role_delete : (Role_t.t -> unit) Stdlib.ref

Dispatched when a role is deleted.

val message_create : (Message_t.t -> unit) Stdlib.ref

Dispatched when a message is sent.

val message_update : (Message_t.message_update -> unit) Stdlib.ref

Dispatched when a message is edited. This does not necessarily mean the content changed.

val message_delete : (Snowflake.t -> Snowflake.t -> unit) Stdlib.ref

Dispatched when a message is deleted.

val message_bulk_delete : (Snowflake.t list -> unit) Stdlib.ref

Dispatched when messages are bulk deleted.

val reaction_add : (Reaction_t.reaction_event -> unit) Stdlib.ref

Dispatched when a rection is added to a message.

val reaction_remove : (Reaction_t.reaction_event -> unit) Stdlib.ref

Dispatched when a reaction is removed from a message.

val reaction_bulk_remove : (Reaction_t.t list -> unit) Stdlib.ref

Dispatched when all reactions are cleared from a message.

val presence_update : (Presence.t -> unit) Stdlib.ref

Dispatched when a user updates their presence.

val typing_start : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when a typing indicator is displayed.

val user_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when the current user is updated. You most likely want Client.member_update or Client.presence_update instead.

type t = {
sharder : Sharder.t;
token : string;
}
val start : ?⁠count:int -> string -> t Async_kernel__Deferred.t
val set_status : status:Yojson.Safe.json -> t -> Sharder.Shard.shard list Async.Deferred.t
val set_status_with : f:(Sharder.Shard.shard -> Yojson.Safe.json) -> t -> Sharder.Shard.shard list Async.Deferred.t
val request_guild_members : guild:Snowflake.t -> ?⁠query:string -> ?⁠limit:int -> t -> Sharder.Shard.shard list Async.Deferred.t
\ No newline at end of file +Client (disml.Disml.Client)

Module Disml.Client

include module type of Client_options
val token : string Stdlib.ref

Token that is set when using Client.start

include module type of Dispatch

Examples

Client.ready := (fun _ -> print_endline "Shard is Ready!")

Client.guild_create := (fun guild -> print_endline guild.name)

open Core
+open Disml
+
+let check_command (msg : Message.t) =
+    if String.is_prefix ~prefix:"!ping" msg.content then
+        Message.reply msg "Pong!" >>> ignore
+
+Client.message_create := check_command
val hello : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when connecting to the gateway, most users will have no use for this.

val ready : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when each shard receives READY from discord after identifying on the gateway. Other event dispatch is received after this.

val resumed : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when successfully reconnecting to the gateway.

val invalid_session : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when Discord decides a session is invalid, much like Client.hello this is not very useful for most people.

val channel_create : (Channel_t.t -> unit) Stdlib.ref

Dispatched when a channel is created which is visible to the bot.

val channel_update : (Channel_t.t -> unit) Stdlib.ref

Dispatched when a channel visible to the bot is changed.

val channel_delete : (Channel_t.t -> unit) Stdlib.ref

Dispatched when a channel visible to the bot is deleted.

val channel_pins_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when messages are pinned or unpinned from a a channel.

val guild_create : (Guild_t.t -> unit) Stdlib.ref

Dispatched when the bot joins a guild, and during startup.

val guild_update : (Guild_t.t -> unit) Stdlib.ref

Dispatched when a guild the bot is in is edited.

val guild_delete : (Guild_t.t -> unit) Stdlib.ref

Dispatched when the bot is removed from a guild.

val member_ban : (Ban_t.t -> unit) Stdlib.ref

Dispatched when a member is banned.

val member_unban : (Ban_t.t -> unit) Stdlib.ref

Dispatched when a member is unbanned.

val guild_emojis_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when emojis are added or removed from a guild.

val integrations_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when a guild's integrations are updated.

val member_join : (Member_t.t -> unit) Stdlib.ref

Dispatched when a member joins a guild.

val member_leave : (Member_t.member_wrapper -> unit) Stdlib.ref

Dispatched when a member leaves a guild. Is Dispatched alongside Client.member_ban when a user is banned.

val member_update : (Member_t.member_update -> unit) Stdlib.ref

Dispatched when a member object is updated.

val members_chunk : (Member_t.t list -> unit) Stdlib.ref

Dispatched when requesting guild members through Client.request_guild_members

val role_create : (Role_t.t -> unit) Stdlib.ref

Dispatched when a role is created.

val role_update : (Role_t.t -> unit) Stdlib.ref

Dispatched when a role is edited.

val role_delete : (Role_t.t -> unit) Stdlib.ref

Dispatched when a role is deleted.

val message_create : (Message_t.t -> unit) Stdlib.ref

Dispatched when a message is sent.

val message_update : (Message_t.message_update -> unit) Stdlib.ref

Dispatched when a message is edited. This does not necessarily mean the content changed.

val message_delete : (Snowflake.t -> Snowflake.t -> unit) Stdlib.ref

Dispatched when a message is deleted.

val message_bulk_delete : (Snowflake.t list -> unit) Stdlib.ref

Dispatched when messages are bulk deleted.

val reaction_add : (Reaction_t.reaction_event -> unit) Stdlib.ref

Dispatched when a rection is added to a message.

val reaction_remove : (Reaction_t.reaction_event -> unit) Stdlib.ref

Dispatched when a reaction is removed from a message.

val reaction_bulk_remove : (Reaction_t.t list -> unit) Stdlib.ref

Dispatched when all reactions are cleared from a message.

val presence_update : (Presence.t -> unit) Stdlib.ref

Dispatched when a user updates their presence.

val typing_start : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when a typing indicator is displayed.

val user_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when the current user is updated. You most likely want Client.member_update or Client.presence_update instead.

type t = {
sharder : Sharder.t;
}

Type of the Client, it isn't recommended to access the fields directly.

val start : ?⁠count:int -> string -> t Async.Deferred.t

Start the Client. This begins shard connections to Discord and event handlers should be registered prior to calling this.

Example

open Async
+open Disml
+
+let main () =
+    let token = "a valid bot token" in
+    Client.start ~count:5 token >>> print_endline "Client launched"
+
+let _ =
+    Scheduler.go_main ~main ()
parameter ?count

Optional amount of shards to launch. Defaults to autosharding

parameter string

The token used for authentication

returns

A deferred client object

val set_status : status:Yojson.Safe.json -> t -> Sharder.Shard.shard list Async.Deferred.t

Same as Sharder.set_status where client.sharder is passed.

val set_status_with : f:(Sharder.Shard.shard -> Yojson.Safe.json) -> t -> Sharder.Shard.shard list Async.Deferred.t

Same as Sharder.set_status_with where client.sharder is passed.

val request_guild_members : guild:Snowflake.t -> ?⁠query:string -> ?⁠limit:int -> t -> Sharder.Shard.shard list Async.Deferred.t

Same as Sharder.request_guild_members where client.sharder is passed.

\ No newline at end of file diff --git a/docs/disml/Disml/Client_options/index.html b/docs/disml/Disml/Client_options/index.html index 0c28b72..6361946 100644 --- a/docs/disml/Disml/Client_options/index.html +++ b/docs/disml/Disml/Client_options/index.html @@ -1,2 +1,2 @@ -Client_options (disml.Disml.Client_options)

Module Disml.Client_options

val token : string Stdlib.ref
\ No newline at end of file +Client_options (disml.Disml.Client_options)

Module Disml.Client_options

val token : string Stdlib.ref

Token that is set when using Client.start

\ No newline at end of file diff --git a/docs/disml/Disml/Dispatch/index.html b/docs/disml/Disml/Dispatch/index.html index 1441d5c..43da27d 100644 --- a/docs/disml/Disml/Dispatch/index.html +++ b/docs/disml/Disml/Dispatch/index.html @@ -1,2 +1,9 @@ -Dispatch (disml.Disml.Dispatch)

Module Disml.Dispatch

val hello : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when connecting to the gateway, most users will have no use for this.

val ready : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when each shard receives READY from discord after identifying on the gateway. Other event dispatch is received after this.

val resumed : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when successfully reconnecting to the gateway.

val invalid_session : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when Discord decides a session is invalid, much like Client.hello this is not very useful for most people.

val channel_create : (Channel_t.t -> unit) Stdlib.ref

Dispatched when a channel is created which is visible to the bot.

val channel_update : (Channel_t.t -> unit) Stdlib.ref

Dispatched when a channel visible to the bot is changed.

val channel_delete : (Channel_t.t -> unit) Stdlib.ref

Dispatched when a channel visible to the bot is deleted.

val channel_pins_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when messages are pinned or unpinned from a a channel.

val guild_create : (Guild_t.t -> unit) Stdlib.ref

Dispatched when the bot joins a guild, and during startup.

val guild_update : (Guild_t.t -> unit) Stdlib.ref

Dispatched when a guild the bot is in is edited.

val guild_delete : (Guild_t.t -> unit) Stdlib.ref

Dispatched when the bot is removed from a guild.

val member_ban : (Ban_t.t -> unit) Stdlib.ref

Dispatched when a member is banned.

val member_unban : (Ban_t.t -> unit) Stdlib.ref

Dispatched when a member is unbanned.

val guild_emojis_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when emojis are added or removed from a guild.

val integrations_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when a guild's integrations are updated.

val member_join : (Member_t.t -> unit) Stdlib.ref

Dispatched when a member joins a guild.

val member_leave : (Member_t.member_wrapper -> unit) Stdlib.ref

Dispatched when a member leaves a guild. Is Dispatched alongside Client.member_ban when a user is banned.

val member_update : (Member_t.member_update -> unit) Stdlib.ref

Dispatched when a member object is updated.

val members_chunk : (Member_t.t list -> unit) Stdlib.ref

Dispatched when requesting guild members through Client.request_guild_members

val role_create : (Role_t.t -> unit) Stdlib.ref

Dispatched when a role is created.

val role_update : (Role_t.t -> unit) Stdlib.ref

Dispatched when a role is edited.

val role_delete : (Role_t.t -> unit) Stdlib.ref

Dispatched when a role is deleted.

val message_create : (Message_t.t -> unit) Stdlib.ref

Dispatched when a message is sent.

val message_update : (Message_t.message_update -> unit) Stdlib.ref

Dispatched when a message is edited. This does not necessarily mean the content changed.

val message_delete : (Snowflake.t -> Snowflake.t -> unit) Stdlib.ref

Dispatched when a message is deleted.

val message_bulk_delete : (Snowflake.t list -> unit) Stdlib.ref

Dispatched when messages are bulk deleted.

val reaction_add : (Reaction_t.reaction_event -> unit) Stdlib.ref

Dispatched when a rection is added to a message.

val reaction_remove : (Reaction_t.reaction_event -> unit) Stdlib.ref

Dispatched when a reaction is removed from a message.

val reaction_bulk_remove : (Reaction_t.t list -> unit) Stdlib.ref

Dispatched when all reactions are cleared from a message.

val presence_update : (Presence.t -> unit) Stdlib.ref

Dispatched when a user updates their presence.

val typing_start : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when a typing indicator is displayed.

val user_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when the current user is updated. You most likely want Client.member_update or Client.presence_update instead.

\ No newline at end of file +Dispatch (disml.Disml.Dispatch)

Module Disml.Dispatch

Examples

Client.ready := (fun _ -> print_endline "Shard is Ready!")

Client.guild_create := (fun guild -> print_endline guild.name)

open Core
+open Disml
+
+let check_command (msg : Message.t) =
+    if String.is_prefix ~prefix:"!ping" msg.content then
+        Message.reply msg "Pong!" >>> ignore
+
+Client.message_create := check_command
val hello : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when connecting to the gateway, most users will have no use for this.

val ready : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when each shard receives READY from discord after identifying on the gateway. Other event dispatch is received after this.

val resumed : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when successfully reconnecting to the gateway.

val invalid_session : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when Discord decides a session is invalid, much like Client.hello this is not very useful for most people.

val channel_create : (Channel_t.t -> unit) Stdlib.ref

Dispatched when a channel is created which is visible to the bot.

val channel_update : (Channel_t.t -> unit) Stdlib.ref

Dispatched when a channel visible to the bot is changed.

val channel_delete : (Channel_t.t -> unit) Stdlib.ref

Dispatched when a channel visible to the bot is deleted.

val channel_pins_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when messages are pinned or unpinned from a a channel.

val guild_create : (Guild_t.t -> unit) Stdlib.ref

Dispatched when the bot joins a guild, and during startup.

val guild_update : (Guild_t.t -> unit) Stdlib.ref

Dispatched when a guild the bot is in is edited.

val guild_delete : (Guild_t.t -> unit) Stdlib.ref

Dispatched when the bot is removed from a guild.

val member_ban : (Ban_t.t -> unit) Stdlib.ref

Dispatched when a member is banned.

val member_unban : (Ban_t.t -> unit) Stdlib.ref

Dispatched when a member is unbanned.

val guild_emojis_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when emojis are added or removed from a guild.

val integrations_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when a guild's integrations are updated.

val member_join : (Member_t.t -> unit) Stdlib.ref

Dispatched when a member joins a guild.

val member_leave : (Member_t.member_wrapper -> unit) Stdlib.ref

Dispatched when a member leaves a guild. Is Dispatched alongside Client.member_ban when a user is banned.

val member_update : (Member_t.member_update -> unit) Stdlib.ref

Dispatched when a member object is updated.

val members_chunk : (Member_t.t list -> unit) Stdlib.ref

Dispatched when requesting guild members through Client.request_guild_members

val role_create : (Role_t.t -> unit) Stdlib.ref

Dispatched when a role is created.

val role_update : (Role_t.t -> unit) Stdlib.ref

Dispatched when a role is edited.

val role_delete : (Role_t.t -> unit) Stdlib.ref

Dispatched when a role is deleted.

val message_create : (Message_t.t -> unit) Stdlib.ref

Dispatched when a message is sent.

val message_update : (Message_t.message_update -> unit) Stdlib.ref

Dispatched when a message is edited. This does not necessarily mean the content changed.

val message_delete : (Snowflake.t -> Snowflake.t -> unit) Stdlib.ref

Dispatched when a message is deleted.

val message_bulk_delete : (Snowflake.t list -> unit) Stdlib.ref

Dispatched when messages are bulk deleted.

val reaction_add : (Reaction_t.reaction_event -> unit) Stdlib.ref

Dispatched when a rection is added to a message.

val reaction_remove : (Reaction_t.reaction_event -> unit) Stdlib.ref

Dispatched when a reaction is removed from a message.

val reaction_bulk_remove : (Reaction_t.t list -> unit) Stdlib.ref

Dispatched when all reactions are cleared from a message.

val presence_update : (Presence.t -> unit) Stdlib.ref

Dispatched when a user updates their presence.

val typing_start : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when a typing indicator is displayed.

val user_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when the current user is updated. You most likely want Client.member_update or Client.presence_update instead.

\ No newline at end of file diff --git a/docs/disml/Disml/Embed/index.html b/docs/disml/Disml/Embed/index.html index 7c952a3..a9e20a6 100644 --- a/docs/disml/Disml/Embed/index.html +++ b/docs/disml/Disml/Embed/index.html @@ -1,2 +1,2 @@ -Embed (disml.Disml.Embed)

Module Disml.Embed

val _ : footer -> Yojson.Safe.json
val _ : Yojson.Safe.json -> footer Ppx_deriving_yojson_runtime.error_or
val _ : Yojson.Safe.json -> footer
type image = {
url : string option;
proxy_url : string option;
height : int option;
width : int option;
}
val image_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> image
val sexp_of_image : image -> Ppx_sexp_conv_lib.Sexp.t
val image_to_yojson : image -> Yojson.Safe.json
val image_of_yojson : Yojson.Safe.json -> image Ppx_deriving_yojson_runtime.error_or
val _ : image -> Yojson.Safe.json
val _ : Yojson.Safe.json -> image Ppx_deriving_yojson_runtime.error_or
val image_of_yojson_exn : Yojson.Safe.json -> image
val _ : Yojson.Safe.json -> image
type video = {
url : string option;
height : int option;
width : int option;
}
val video_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> video
val sexp_of_video : video -> Ppx_sexp_conv_lib.Sexp.t
val video_to_yojson : video -> Yojson.Safe.json
val video_of_yojson : Yojson.Safe.json -> video Ppx_deriving_yojson_runtime.error_or
val _ : video -> Yojson.Safe.json
val _ : Yojson.Safe.json -> video Ppx_deriving_yojson_runtime.error_or
val video_of_yojson_exn : Yojson.Safe.json -> video
val _ : Yojson.Safe.json -> video
type provider = {
name : string option;
url : string option;
}
val provider_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> provider
val sexp_of_provider : provider -> Ppx_sexp_conv_lib.Sexp.t
val provider_to_yojson : provider -> Yojson.Safe.json
val provider_of_yojson : Yojson.Safe.json -> provider Ppx_deriving_yojson_runtime.error_or
val _ : provider -> Yojson.Safe.json
val _ : Yojson.Safe.json -> provider Ppx_deriving_yojson_runtime.error_or
val provider_of_yojson_exn : Yojson.Safe.json -> provider
val _ : Yojson.Safe.json -> provider
type author = {
name : string option;
url : string option;
icon_url : string option;
proxy_icon_url : string option;
}
val author_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> author
val sexp_of_author : author -> Ppx_sexp_conv_lib.Sexp.t
val author_to_yojson : author -> Yojson.Safe.json
val author_of_yojson : Yojson.Safe.json -> author Ppx_deriving_yojson_runtime.error_or
val _ : author -> Yojson.Safe.json
val _ : Yojson.Safe.json -> author Ppx_deriving_yojson_runtime.error_or
val author_of_yojson_exn : Yojson.Safe.json -> author
val _ : Yojson.Safe.json -> author
type field = {
name : string;
value : string;
inline : bool;
}
val field_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> field
val sexp_of_field : field -> Ppx_sexp_conv_lib.Sexp.t
val field_to_yojson : field -> Yojson.Safe.json
val field_of_yojson : Yojson.Safe.json -> field Ppx_deriving_yojson_runtime.error_or
val _ : field -> Yojson.Safe.json
val _ : Yojson.Safe.json -> field Ppx_deriving_yojson_runtime.error_or
val field_of_yojson_exn : Yojson.Safe.json -> field
val _ : Yojson.Safe.json -> field
type t = {
title : string option;
kind : string option;
description : string option;
url : string option;
timestamp : string option;
colour : int option;
footer : footer option;
image : image option;
thumbnail : image option;
video : video option;
provider : provider option;
author : author option;
fields : field list;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
\ No newline at end of file +Embed (disml.Disml.Embed)

Module Disml.Embed

type image = {
url : string option;
proxy_url : string option;
height : int option;
width : int option;
}
val image_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> image
val sexp_of_image : image -> Ppx_sexp_conv_lib.Sexp.t
val image_to_yojson : image -> Yojson.Safe.json
val image_of_yojson : Yojson.Safe.json -> image Ppx_deriving_yojson_runtime.error_or
val image_of_yojson_exn : Yojson.Safe.json -> image
type video = {
url : string option;
height : int option;
width : int option;
}
val video_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> video
val sexp_of_video : video -> Ppx_sexp_conv_lib.Sexp.t
val video_to_yojson : video -> Yojson.Safe.json
val video_of_yojson : Yojson.Safe.json -> video Ppx_deriving_yojson_runtime.error_or
val video_of_yojson_exn : Yojson.Safe.json -> video
type provider = {
name : string option;
url : string option;
}
val provider_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> provider
val sexp_of_provider : provider -> Ppx_sexp_conv_lib.Sexp.t
val provider_to_yojson : provider -> Yojson.Safe.json
val provider_of_yojson : Yojson.Safe.json -> provider Ppx_deriving_yojson_runtime.error_or
val provider_of_yojson_exn : Yojson.Safe.json -> provider
type author = {
name : string option;
url : string option;
icon_url : string option;
proxy_icon_url : string option;
}
val author_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> author
val sexp_of_author : author -> Ppx_sexp_conv_lib.Sexp.t
val author_to_yojson : author -> Yojson.Safe.json
val author_of_yojson : Yojson.Safe.json -> author Ppx_deriving_yojson_runtime.error_or
val author_of_yojson_exn : Yojson.Safe.json -> author
type field = {
name : string;
value : string;
inline : bool;
}
val field_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> field
val sexp_of_field : field -> Ppx_sexp_conv_lib.Sexp.t
val field_to_yojson : field -> Yojson.Safe.json
val field_of_yojson : Yojson.Safe.json -> field Ppx_deriving_yojson_runtime.error_or
val field_of_yojson_exn : Yojson.Safe.json -> field
type t = {
title : string option;
kind : string option;
description : string option;
url : string option;
timestamp : string option;
colour : int option;
footer : footer option;
image : image option;
thumbnail : image option;
video : video option;
provider : provider option;
author : author option;
fields : field list;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val default : t
val default_image : image
val default_video : video
val default_provider : provider
val default_author : author
val title : string -> t -> t
val description : string -> t -> t
val url : string -> t -> t
val timestamp : string -> t -> t
val colour : int -> t -> t
val color : int -> t -> t
val image : string -> t -> t
val thumbnail : string -> t -> t
val author : (author -> author) -> t -> t
val field : (string * string * bool) -> t -> t
val fields : (string * string * bool) list -> t -> t
val author_name : string -> author -> author
val author_url : string -> author -> author
val author_icon : string -> author -> author
\ No newline at end of file diff --git a/docs/disml/Disml/Emoji/index.html b/docs/disml/Disml/Emoji/index.html index e2196d7..69a0b10 100644 --- a/docs/disml/Disml/Emoji/index.html +++ b/docs/disml/Disml/Emoji/index.html @@ -1,2 +1,2 @@ -Emoji (disml.Disml.Emoji)

Module Disml.Emoji

type partial_emoji = {
id : Snowflake.t option;
name : string;
}
val partial_emoji_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> partial_emoji
val sexp_of_partial_emoji : partial_emoji -> Ppx_sexp_conv_lib.Sexp.t
val partial_emoji_to_yojson : partial_emoji -> Yojson.Safe.json
val partial_emoji_of_yojson : Yojson.Safe.json -> partial_emoji Ppx_deriving_yojson_runtime.error_or
val _ : partial_emoji -> Yojson.Safe.json
val _ : Yojson.Safe.json -> partial_emoji Ppx_deriving_yojson_runtime.error_or
val partial_emoji_of_yojson_exn : Yojson.Safe.json -> partial_emoji
val _ : Yojson.Safe.json -> partial_emoji
type t = {
id : Snowflake.t option;
name : string;
roles : Snowflake.t list;
user : User_t.t option;
require_colons : bool option;
managed : bool option;
animated : bool option;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
\ No newline at end of file +Emoji (disml.Disml.Emoji)

Module Disml.Emoji

type partial_emoji = {
id : Snowflake.t option;
name : string;
}
val partial_emoji_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> partial_emoji
val sexp_of_partial_emoji : partial_emoji -> Ppx_sexp_conv_lib.Sexp.t
val partial_emoji_to_yojson : partial_emoji -> Yojson.Safe.json
val partial_emoji_of_yojson : Yojson.Safe.json -> partial_emoji Ppx_deriving_yojson_runtime.error_or
val partial_emoji_of_yojson_exn : Yojson.Safe.json -> partial_emoji
type t = {
id : Snowflake.t option;
name : string;
roles : Snowflake.t list;
user : User_t.t option;
require_colons : bool option;
managed : bool option;
animated : bool option;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
\ No newline at end of file diff --git a/docs/disml/Disml/Endpoints/index.html b/docs/disml/Disml/Endpoints/index.html index c2fff18..180a95e 100644 --- a/docs/disml/Disml/Endpoints/index.html +++ b/docs/disml/Disml/Endpoints/index.html @@ -1,2 +1,2 @@ -Endpoints (disml.Disml.Endpoints)

Module Disml.Endpoints

val gateway : string
val gateway_bot : string
val channel : int -> string
val channel_messages : int -> string
val channel_message : int -> int -> string
val channel_reaction_me : int -> int -> string -> string
val channel_reaction : int -> int -> string -> int -> string
val channel_reactions_get : int -> int -> string -> string
val channel_reactions_delete : int -> int -> string
val channel_bulk_delete : int -> string
val channel_permission : int -> int -> string
val channel_permissions : int -> string
val channels : string
val channel_call_ring : int -> string
val channel_invites : int -> string
val channel_typing : int -> string
val channel_pins : int -> string
val channel_pin : int -> int -> string
val guilds : string
val guild : int -> string
val guild_channels : int -> string
val guild_members : int -> string
val guild_member : int -> int -> string
val guild_member_role : int -> int -> int -> string
val guild_bans : int -> string
val guild_ban : int -> int -> string
val guild_roles : int -> string
val guild_role : int -> int -> string
val guild_prune : int -> string
val guild_voice_regions : int -> string
val guild_invites : int -> string
val guild_integrations : int -> string
val guild_integration : int -> int -> string
val guild_integration_sync : int -> int -> string
val guild_embed : int -> string
val guild_emojis : int -> string
val guild_emoji : int -> int -> string
val webhooks_guild : int -> string
val webhooks_channel : int -> string
val webhook : int -> string
val webhook_token : int -> string -> string
val webhook_git : int -> string -> string
val webhook_slack : int -> string -> string
val user : int -> string
val me : string
val me_guilds : string
val me_guild : int -> string
val me_channels : string
val me_connections : string
val invite : string -> string
val regions : string
val application_information : string
val group_recipient : int -> int -> string
val guild_me_nick : int -> string
val guild_vanity_url : int -> string
val guild_audit_logs : int -> string
val cdn_embed_avatar : string -> string
val cdn_emoji : string -> string -> string
val cdn_icon : int -> string -> string -> string
val cdn_avatar : int -> string -> string -> string
val cdn_default_avatar : int -> string
\ No newline at end of file +Endpoints (disml.Disml.Endpoints)

Module Disml.Endpoints

val gateway : string
val gateway_bot : string
val channel : int -> string
val channel_messages : int -> string
val channel_message : int -> int -> string
val channel_reaction_me : int -> int -> string -> string
val channel_reaction : int -> int -> string -> int -> string
val channel_reactions_get : int -> int -> string -> string
val channel_reactions_delete : int -> int -> string
val channel_bulk_delete : int -> string
val channel_permission : int -> int -> string
val channel_permissions : int -> string
val channels : string
val channel_call_ring : int -> string
val channel_invites : int -> string
val channel_typing : int -> string
val channel_pins : int -> string
val channel_pin : int -> int -> string
val guilds : string
val guild : int -> string
val guild_channels : int -> string
val guild_members : int -> string
val guild_member : int -> int -> string
val guild_member_role : int -> int -> int -> string
val guild_bans : int -> string
val guild_ban : int -> int -> string
val guild_roles : int -> string
val guild_role : int -> int -> string
val guild_prune : int -> string
val guild_voice_regions : int -> string
val guild_invites : int -> string
val guild_integrations : int -> string
val guild_integration : int -> int -> string
val guild_integration_sync : int -> int -> string
val guild_embed : int -> string
val guild_emojis : int -> string
val guild_emoji : int -> int -> string
val webhooks_guild : int -> string
val webhooks_channel : int -> string
val webhook : int -> string
val webhook_token : int -> string -> string
val webhook_git : int -> string -> string
val webhook_slack : int -> string -> string
val user : int -> string
val me : string
val me_guilds : string
val me_guild : int -> string
val me_channels : string
val me_connections : string
val invite : string -> string
val regions : string
val application_information : string
val group_recipient : int -> int -> string
val guild_me_nick : int -> string
val guild_vanity_url : int -> string
val guild_audit_logs : int -> string
val cdn_embed_avatar : string -> string
val cdn_emoji : string -> string -> string
val cdn_icon : int -> string -> string -> string
val cdn_avatar : int -> string -> string -> string
val cdn_default_avatar : int -> string
\ No newline at end of file diff --git a/docs/disml/Disml/Event/index.html b/docs/disml/Disml/Event/index.html index f3917da..90a9b8f 100644 --- a/docs/disml/Disml/Event/index.html +++ b/docs/disml/Disml/Event/index.html @@ -1,2 +1,2 @@ -Event (disml.Disml.Event)

Module Disml.Event

exception Invalid_event of string
type t =
| HELLO of Yojson.Safe.json
| READY of Yojson.Safe.json
| RESUMED of Yojson.Safe.json
| INVALID_SESSION of Yojson.Safe.json
| CHANNEL_CREATE of Channel_t.t
| CHANNEL_UPDATE of Channel_t.t
| CHANNEL_DELETE of Channel_t.t
| CHANNEL_PINS_UPDATE of Yojson.Safe.json
| GUILD_CREATE of Guild_t.t
| GUILD_UPDATE of Guild_t.t
| GUILD_DELETE of Guild_t.t
| GUILD_BAN_ADD of Ban_t.t
| GUILD_BAN_REMOVE of Ban_t.t
| GUILD_EMOJIS_UPDATE of Yojson.Safe.json
| GUILD_INTEGRATIONS_UPDATE of Yojson.Safe.json
| GUILD_MEMBER_ADD of Member_t.t
| GUILD_MEMBER_REMOVE of Member_t.member_wrapper
| GUILD_MEMBER_UPDATE of Member_t.member_update
| GUILD_MEMBERS_CHUNK of Member_t.t list
| GUILD_ROLE_CREATE of Role_t.t
| GUILD_ROLE_UPDATE of Role_t.t
| GUILD_ROLE_DELETE of Role_t.t
| MESSAGE_CREATE of Message_t.t
| MESSAGE_UPDATE of Message_t.message_update
| MESSAGE_DELETE of Snowflake.t * Snowflake.t
| MESSAGE_BULK_DELETE of Snowflake.t list
| MESSAGE_REACTION_ADD of Reaction_t.reaction_event
| MESSAGE_REACTION_REMOVE of Reaction_t.reaction_event
| MESSAGE_REACTION_REMOVE_ALL of Reaction_t.t list
| PRESENCE_UPDATE of Presence.t
| TYPING_START of Yojson.Safe.json
| USER_UPDATE of Yojson.Safe.json
| VOICE_STATE_UPDATE of Yojson.Safe.json
| VOICE_SERVER_UPDATE of Yojson.Safe.json
| WEBHOOKS_UPDATE of Yojson.Safe.json
val event_of_yojson : contents:Yojson.Safe.json -> string -> t
val dispatch : t -> unit
val handle_event : ev:string -> Yojson.Safe.json -> unit
\ No newline at end of file +Event (disml.Disml.Event)

Module Disml.Event

exception Invalid_event of string

Used internally when received an unknown event. Is caught and logged.

type t =
| HELLO of Yojson.Safe.json
| READY of Yojson.Safe.json
| RESUMED of Yojson.Safe.json
| INVALID_SESSION of Yojson.Safe.json
| CHANNEL_CREATE of Channel_t.t
| CHANNEL_UPDATE of Channel_t.t
| CHANNEL_DELETE of Channel_t.t
| CHANNEL_PINS_UPDATE of Yojson.Safe.json
| GUILD_CREATE of Guild_t.t
| GUILD_UPDATE of Guild_t.t
| GUILD_DELETE of Guild_t.t
| GUILD_BAN_ADD of Ban_t.t
| GUILD_BAN_REMOVE of Ban_t.t
| GUILD_EMOJIS_UPDATE of Yojson.Safe.json
| GUILD_INTEGRATIONS_UPDATE of Yojson.Safe.json
| GUILD_MEMBER_ADD of Member_t.t
| GUILD_MEMBER_REMOVE of Member_t.member_wrapper
| GUILD_MEMBER_UPDATE of Member_t.member_update
| GUILD_MEMBERS_CHUNK of Member_t.t list
| GUILD_ROLE_CREATE of Role_t.t
| GUILD_ROLE_UPDATE of Role_t.t
| GUILD_ROLE_DELETE of Role_t.t
| MESSAGE_CREATE of Message_t.t
| MESSAGE_UPDATE of Message_t.message_update
| MESSAGE_DELETE of Snowflake.t * Snowflake.t
| MESSAGE_BULK_DELETE of Snowflake.t list
| MESSAGE_REACTION_ADD of Reaction_t.reaction_event
| MESSAGE_REACTION_REMOVE of Reaction_t.reaction_event
| MESSAGE_REACTION_REMOVE_ALL of Reaction_t.t list
| PRESENCE_UPDATE of Presence.t
| TYPING_START of Yojson.Safe.json
| USER_UPDATE of Yojson.Safe.json
| VOICE_STATE_UPDATE of Yojson.Safe.json
| VOICE_SERVER_UPDATE of Yojson.Safe.json
| WEBHOOKS_UPDATE of Yojson.Safe.json

Event dispatch type wrapper. Used internally.

val event_of_yojson : contents:Yojson.Safe.json -> string -> t

Used to convert an event string and payload into a t wrapper type.

val dispatch : t -> unit

Sends the event to the registered handler.

val handle_event : ev:string -> Yojson.Safe.json -> unit

Wrapper to other functions. This is called from the shards.

\ No newline at end of file diff --git a/docs/disml/Disml/Guild/index.html b/docs/disml/Disml/Guild/index.html index 5bbefc8..ac6bd6e 100644 --- a/docs/disml/Disml/Guild/index.html +++ b/docs/disml/Disml/Guild/index.html @@ -1,2 +1,2 @@ -Guild (disml.Disml.Guild)

Module Disml.Guild

include module type of Guild_t
type pre = {
id : Snowflake.t;
name : string;
icon : string option;
splash : string option;
owner_id : Snowflake.t;
region : string;
afk_channel_id : Snowflake.t option;
afk_timeout : int;
embed_enabled : bool option;
embed_channel_id : Snowflake.t option;
verification_level : int;
default_message_notifications : int;
explicit_content_filter : int;
roles : Role_t.role list;
emojis : Emoji.t list;
features : string list;
mfa_level : int;
application_id : Snowflake.t option;
widget_enabled : bool option;
widget_channel : Channel_t.channel_wrapper option;
system_channel : Channel_t.channel_wrapper option;
large : bool;
unavailable : bool;
member_count : int option;
members : Member_t.member list;
channels : Channel_t.channel_wrapper list;
}
val pre_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> pre
val sexp_of_pre : pre -> Ppx_sexp_conv_lib.Sexp.t
val pre_to_yojson : pre -> Yojson.Safe.json
val pre_of_yojson : Yojson.Safe.json -> pre Ppx_deriving_yojson_runtime.error_or
val _ : pre -> Yojson.Safe.json
val _ : Yojson.Safe.json -> pre Ppx_deriving_yojson_runtime.error_or
val pre_of_yojson_exn : Yojson.Safe.json -> pre
val _ : Yojson.Safe.json -> pre
type t = {
id : Snowflake.t;
name : string;
icon : string option;
splash : string option;
owner_id : Snowflake.t;
region : string;
afk_channel_id : Snowflake.t option;
afk_timeout : int;
embed_enabled : bool option;
embed_channel_id : Snowflake.t option;
verification_level : int;
default_message_notifications : int;
explicit_content_filter : int;
roles : Role_t.t list;
emojis : Emoji.t list;
features : string list;
mfa_level : int;
application_id : Snowflake.t option;
widget_enabled : bool option;
widget_channel : Channel_t.t option;
system_channel : Channel_t.t option;
large : bool;
unavailable : bool;
member_count : int option;
members : Member_t.t list;
channels : Channel_t.t list;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
val wrap : pre -> t
val ban_user : id:Snowflake.t -> ?⁠reason:string -> ?⁠days:int -> t -> unit Async.Deferred.Or_error.t
val create_emoji : name:string -> image:string -> t -> Emoji.t Async.Deferred.Or_error.t
val create_role : name:string -> ?⁠colour:int -> ?⁠permissions:int -> ?⁠hoist:bool -> ?⁠mentionable:bool -> t -> Role_t.t Async.Deferred.Or_error.t
val create_channel : mode:[ `Text | `Voice | `Category ] -> name:string -> t -> Channel_t.t Async.Deferred.Or_error.t
val delete : t -> unit Async.Deferred.Or_error.t
val get_ban : id:Snowflake.t -> t -> Ban_t.t Async.Deferred.Or_error.t
val get_bans : t -> Ban_t.t list Async.Deferred.Or_error.t
val get_channel : id:Snowflake.t -> t -> Channel_t.t Async.Deferred.Or_error.t
val get_emoji : id:Snowflake.t -> t -> Emoji.t Async.Deferred.Or_error.t
val get_invites : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val get_member : id:Snowflake.t -> t -> Member_t.t Async.Deferred.Or_error.t
val get_prune_count : days:int -> t -> int Async.Deferred.Or_error.t
val get_role : id:Snowflake.t -> t -> Role_t.t option
val get_webhooks : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val kick_user : id:Snowflake.t -> ?⁠reason:string -> t -> unit Async.Deferred.Or_error.t
val leave : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val list_voice_regions : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val prune : days:int -> t -> int Async.Deferred.Or_error.t
val request_members : t -> Member_t.t list Async.Deferred.Or_error.t
val set_afk_channel : id:Snowflake.t -> t -> t Async.Deferred.Or_error.t
val set_afk_timeout : timeout:int -> t -> t Async.Deferred.Or_error.t
val set_name : name:string -> t -> t Async.Deferred.Or_error.t
val set_icon : icon:string -> t -> t Async.Deferred.Or_error.t
val unban_user : id:Snowflake.t -> ?⁠reason:string -> t -> unit Async.Deferred.Or_error.t
\ No newline at end of file +Guild (disml.Disml.Guild)

Module Disml.Guild

include module type of Guild_t
type pre = {
id : Snowflake.t;
name : string;
icon : string option;
splash : string option;
owner_id : Snowflake.t;
region : string;
afk_channel_id : Snowflake.t option;
afk_timeout : int;
embed_enabled : bool option;
embed_channel_id : Snowflake.t option;
verification_level : int;
default_message_notifications : int;
explicit_content_filter : int;
roles : Role_t.role list;
emojis : Emoji.t list;
features : string list;
mfa_level : int;
application_id : Snowflake.t option;
widget_enabled : bool option;
widget_channel : Channel_t.channel_wrapper option;
system_channel : Channel_t.channel_wrapper option;
large : bool;
unavailable : bool;
member_count : int option;
members : Member_t.member list;
channels : Channel_t.channel_wrapper list;
}
val pre_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> pre
val sexp_of_pre : pre -> Ppx_sexp_conv_lib.Sexp.t
val pre_to_yojson : pre -> Yojson.Safe.json
val pre_of_yojson : Yojson.Safe.json -> pre Ppx_deriving_yojson_runtime.error_or
val pre_of_yojson_exn : Yojson.Safe.json -> pre
type t = {
id : Snowflake.t;
name : string;
icon : string option;
splash : string option;
owner_id : Snowflake.t;
region : string;
afk_channel_id : Snowflake.t option;
afk_timeout : int;
embed_enabled : bool option;
embed_channel_id : Snowflake.t option;
verification_level : int;
default_message_notifications : int;
explicit_content_filter : int;
roles : Role_t.t list;
emojis : Emoji.t list;
features : string list;
mfa_level : int;
application_id : Snowflake.t option;
widget_enabled : bool option;
widget_channel : Channel_t.t option;
system_channel : Channel_t.t option;
large : bool;
unavailable : bool;
member_count : int option;
members : Member_t.t list;
channels : Channel_t.t list;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val wrap : pre -> t
val ban_user : id:Snowflake.t -> ?⁠reason:string -> ?⁠days:int -> t -> unit Async.Deferred.Or_error.t
val create_emoji : name:string -> image:string -> t -> Emoji.t Async.Deferred.Or_error.t
val create_role : name:string -> ?⁠colour:int -> ?⁠permissions:int -> ?⁠hoist:bool -> ?⁠mentionable:bool -> t -> Role_t.t Async.Deferred.Or_error.t
val create_channel : mode:[ `Text | `Voice | `Category ] -> name:string -> t -> Channel_t.t Async.Deferred.Or_error.t
val delete : t -> unit Async.Deferred.Or_error.t
val get_ban : id:Snowflake.t -> t -> Ban_t.t Async.Deferred.Or_error.t
val get_bans : t -> Ban_t.t list Async.Deferred.Or_error.t
val get_channel : id:Snowflake.t -> t -> Channel_t.t Async.Deferred.Or_error.t
val get_emoji : id:Snowflake.t -> t -> Emoji.t Async.Deferred.Or_error.t
val get_invites : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val get_member : id:Snowflake.t -> t -> Member_t.t Async.Deferred.Or_error.t
val get_prune_count : days:int -> t -> int Async.Deferred.Or_error.t
val get_role : id:Snowflake.t -> t -> Role_t.t option
val get_webhooks : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val kick_user : id:Snowflake.t -> ?⁠reason:string -> t -> unit Async.Deferred.Or_error.t
val leave : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val list_voice_regions : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val prune : days:int -> t -> int Async.Deferred.Or_error.t
val request_members : t -> Member_t.t list Async.Deferred.Or_error.t
val set_afk_channel : id:Snowflake.t -> t -> t Async.Deferred.Or_error.t
val set_afk_timeout : timeout:int -> t -> t Async.Deferred.Or_error.t
val set_name : name:string -> t -> t Async.Deferred.Or_error.t
val set_icon : icon:string -> t -> t Async.Deferred.Or_error.t
val unban_user : id:Snowflake.t -> ?⁠reason:string -> t -> unit Async.Deferred.Or_error.t
\ No newline at end of file diff --git a/docs/disml/Disml/Guild_t/index.html b/docs/disml/Disml/Guild_t/index.html index 5348842..284f9fd 100644 --- a/docs/disml/Disml/Guild_t/index.html +++ b/docs/disml/Disml/Guild_t/index.html @@ -1,2 +1,2 @@ -Guild_t (disml.Disml.Guild_t)

Module Disml.Guild_t

type pre = {
id : Snowflake.t;
name : string;
icon : string option;
splash : string option;
owner_id : Snowflake.t;
region : string;
afk_channel_id : Snowflake.t option;
afk_timeout : int;
embed_enabled : bool option;
embed_channel_id : Snowflake.t option;
verification_level : int;
default_message_notifications : int;
explicit_content_filter : int;
roles : Role_t.role list;
emojis : Emoji.t list;
features : string list;
mfa_level : int;
application_id : Snowflake.t option;
widget_enabled : bool option;
widget_channel : Channel_t.channel_wrapper option;
system_channel : Channel_t.channel_wrapper option;
large : bool;
unavailable : bool;
member_count : int option;
members : Member_t.member list;
channels : Channel_t.channel_wrapper list;
}
val pre_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> pre
val sexp_of_pre : pre -> Ppx_sexp_conv_lib.Sexp.t
val pre_to_yojson : pre -> Yojson.Safe.json
val pre_of_yojson : Yojson.Safe.json -> pre Ppx_deriving_yojson_runtime.error_or
val _ : pre -> Yojson.Safe.json
val _ : Yojson.Safe.json -> pre Ppx_deriving_yojson_runtime.error_or
val pre_of_yojson_exn : Yojson.Safe.json -> pre
val _ : Yojson.Safe.json -> pre
type t = {
id : Snowflake.t;
name : string;
icon : string option;
splash : string option;
owner_id : Snowflake.t;
region : string;
afk_channel_id : Snowflake.t option;
afk_timeout : int;
embed_enabled : bool option;
embed_channel_id : Snowflake.t option;
verification_level : int;
default_message_notifications : int;
explicit_content_filter : int;
roles : Role_t.t list;
emojis : Emoji.t list;
features : string list;
mfa_level : int;
application_id : Snowflake.t option;
widget_enabled : bool option;
widget_channel : Channel_t.t option;
system_channel : Channel_t.t option;
large : bool;
unavailable : bool;
member_count : int option;
members : Member_t.t list;
channels : Channel_t.t list;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
val wrap : pre -> t
\ No newline at end of file +Guild_t (disml.Disml.Guild_t)

Module Disml.Guild_t

type pre = {
id : Snowflake.t;
name : string;
icon : string option;
splash : string option;
owner_id : Snowflake.t;
region : string;
afk_channel_id : Snowflake.t option;
afk_timeout : int;
embed_enabled : bool option;
embed_channel_id : Snowflake.t option;
verification_level : int;
default_message_notifications : int;
explicit_content_filter : int;
roles : Role_t.role list;
emojis : Emoji.t list;
features : string list;
mfa_level : int;
application_id : Snowflake.t option;
widget_enabled : bool option;
widget_channel : Channel_t.channel_wrapper option;
system_channel : Channel_t.channel_wrapper option;
large : bool;
unavailable : bool;
member_count : int option;
members : Member_t.member list;
channels : Channel_t.channel_wrapper list;
}
val pre_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> pre
val sexp_of_pre : pre -> Ppx_sexp_conv_lib.Sexp.t
val pre_to_yojson : pre -> Yojson.Safe.json
val pre_of_yojson : Yojson.Safe.json -> pre Ppx_deriving_yojson_runtime.error_or
val pre_of_yojson_exn : Yojson.Safe.json -> pre
type t = {
id : Snowflake.t;
name : string;
icon : string option;
splash : string option;
owner_id : Snowflake.t;
region : string;
afk_channel_id : Snowflake.t option;
afk_timeout : int;
embed_enabled : bool option;
embed_channel_id : Snowflake.t option;
verification_level : int;
default_message_notifications : int;
explicit_content_filter : int;
roles : Role_t.t list;
emojis : Emoji.t list;
features : string list;
mfa_level : int;
application_id : Snowflake.t option;
widget_enabled : bool option;
widget_channel : Channel_t.t option;
system_channel : Channel_t.t option;
large : bool;
unavailable : bool;
member_count : int option;
members : Member_t.t list;
channels : Channel_t.t list;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val wrap : pre -> t
\ No newline at end of file diff --git a/docs/disml/Disml/Member/index.html b/docs/disml/Disml/Member/index.html index 2bb0712..e9a2971 100644 --- a/docs/disml/Disml/Member/index.html +++ b/docs/disml/Disml/Member/index.html @@ -1,2 +1,2 @@ -Member (disml.Disml.Member)

Module Disml.Member

include module type of Member_t
type partial_member = {
nick : string option;
roles : Snowflake.t list;
joined_at : string;
deaf : bool;
mute : bool;
}
val partial_member_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> partial_member
val sexp_of_partial_member : partial_member -> Ppx_sexp_conv_lib.Sexp.t
val partial_member_to_yojson : partial_member -> Yojson.Safe.json
val partial_member_of_yojson : Yojson.Safe.json -> partial_member Ppx_deriving_yojson_runtime.error_or
val _ : partial_member -> Yojson.Safe.json
val _ : Yojson.Safe.json -> partial_member Ppx_deriving_yojson_runtime.error_or
val partial_member_of_yojson_exn : Yojson.Safe.json -> partial_member
val _ : Yojson.Safe.json -> partial_member
type member = {
nick : string option;
roles : Snowflake.t list;
joined_at : string;
deaf : bool;
mute : bool;
user : User_t.t;
}
val member_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> member
val sexp_of_member : member -> Ppx_sexp_conv_lib.Sexp.t
val member_to_yojson : member -> Yojson.Safe.json
val member_of_yojson : Yojson.Safe.json -> member Ppx_deriving_yojson_runtime.error_or
val _ : member -> Yojson.Safe.json
val _ : Yojson.Safe.json -> member Ppx_deriving_yojson_runtime.error_or
val member_of_yojson_exn : Yojson.Safe.json -> member
val _ : Yojson.Safe.json -> member
type member_wrapper = {
guild_id : Snowflake.t;
user : User_t.t;
}
val member_wrapper_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> member_wrapper
val sexp_of_member_wrapper : member_wrapper -> Ppx_sexp_conv_lib.Sexp.t
val member_wrapper_to_yojson : member_wrapper -> Yojson.Safe.json
val member_wrapper_of_yojson : Yojson.Safe.json -> member_wrapper Ppx_deriving_yojson_runtime.error_or
val _ : member_wrapper -> Yojson.Safe.json
val _ : Yojson.Safe.json -> member_wrapper Ppx_deriving_yojson_runtime.error_or
val member_wrapper_of_yojson_exn : Yojson.Safe.json -> member_wrapper
val _ : Yojson.Safe.json -> member_wrapper
type member_update = {
guild_id : Snowflake.t;
roles : Snowflake.t list;
user : User_t.t;
nick : string option;
}
val member_update_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> member_update
val sexp_of_member_update : member_update -> Ppx_sexp_conv_lib.Sexp.t
val member_update_to_yojson : member_update -> Yojson.Safe.json
val member_update_of_yojson : Yojson.Safe.json -> member_update Ppx_deriving_yojson_runtime.error_or
val _ : member_update -> Yojson.Safe.json
val _ : Yojson.Safe.json -> member_update Ppx_deriving_yojson_runtime.error_or
val member_update_of_yojson_exn : Yojson.Safe.json -> member_update
val _ : Yojson.Safe.json -> member_update
type t = {
nick : string option;
roles : Snowflake.t list;
joined_at : string;
deaf : bool;
mute : bool;
user : User_t.t;
guild_id : Snowflake.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
val wrap : guild_id:Snowflake.t -> member -> t
val add_role : role:Role_t.t -> Member_t.t -> unit Async.Deferred.Or_error.t
val remove_role : role:Role_t.t -> Member_t.t -> unit Async.Deferred.Or_error.t
val ban : ?⁠reason:string -> ?⁠days:int -> Member_t.t -> unit Async.Deferred.Or_error.t
val kick : ?⁠reason:string -> Member_t.t -> unit Async.Deferred.Or_error.t
val mute : Member_t.t -> unit Async.Deferred.Or_error.t
val deafen : Member_t.t -> unit Async.Deferred.Or_error.t
val unmute : Member_t.t -> unit Async.Deferred.Or_error.t
val undeafen : Member_t.t -> unit Async.Deferred.Or_error.t
\ No newline at end of file +Member (disml.Disml.Member)

Module Disml.Member

include module type of Member_t
type partial_member = {
nick : string option;
roles : Snowflake.t list;
joined_at : string;
deaf : bool;
mute : bool;
}
val partial_member_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> partial_member
val sexp_of_partial_member : partial_member -> Ppx_sexp_conv_lib.Sexp.t
val partial_member_to_yojson : partial_member -> Yojson.Safe.json
val partial_member_of_yojson : Yojson.Safe.json -> partial_member Ppx_deriving_yojson_runtime.error_or
val partial_member_of_yojson_exn : Yojson.Safe.json -> partial_member
type member = {
nick : string option;
roles : Snowflake.t list;
joined_at : string;
deaf : bool;
mute : bool;
user : User_t.t;
}
val member_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> member
val sexp_of_member : member -> Ppx_sexp_conv_lib.Sexp.t
val member_to_yojson : member -> Yojson.Safe.json
val member_of_yojson : Yojson.Safe.json -> member Ppx_deriving_yojson_runtime.error_or
val member_of_yojson_exn : Yojson.Safe.json -> member
type member_wrapper = {
guild_id : Snowflake.t;
user : User_t.t;
}
val member_wrapper_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> member_wrapper
val sexp_of_member_wrapper : member_wrapper -> Ppx_sexp_conv_lib.Sexp.t
val member_wrapper_to_yojson : member_wrapper -> Yojson.Safe.json
val member_wrapper_of_yojson : Yojson.Safe.json -> member_wrapper Ppx_deriving_yojson_runtime.error_or
val member_wrapper_of_yojson_exn : Yojson.Safe.json -> member_wrapper
type member_update = {
guild_id : Snowflake.t;
roles : Snowflake.t list;
user : User_t.t;
nick : string option;
}
val member_update_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> member_update
val sexp_of_member_update : member_update -> Ppx_sexp_conv_lib.Sexp.t
val member_update_to_yojson : member_update -> Yojson.Safe.json
val member_update_of_yojson : Yojson.Safe.json -> member_update Ppx_deriving_yojson_runtime.error_or
val member_update_of_yojson_exn : Yojson.Safe.json -> member_update
type t = {
nick : string option;
roles : Snowflake.t list;
joined_at : string;
deaf : bool;
mute : bool;
user : User_t.t;
guild_id : Snowflake.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val wrap : guild_id:Snowflake.t -> member -> t
val add_role : role:Role_t.t -> Member_t.t -> unit Async.Deferred.Or_error.t
val remove_role : role:Role_t.t -> Member_t.t -> unit Async.Deferred.Or_error.t
val ban : ?⁠reason:string -> ?⁠days:int -> Member_t.t -> unit Async.Deferred.Or_error.t
val kick : ?⁠reason:string -> Member_t.t -> unit Async.Deferred.Or_error.t
val mute : Member_t.t -> unit Async.Deferred.Or_error.t
val deafen : Member_t.t -> unit Async.Deferred.Or_error.t
val unmute : Member_t.t -> unit Async.Deferred.Or_error.t
val undeafen : Member_t.t -> unit Async.Deferred.Or_error.t
\ No newline at end of file diff --git a/docs/disml/Disml/Member_t/index.html b/docs/disml/Disml/Member_t/index.html index 42ffed1..bf99c09 100644 --- a/docs/disml/Disml/Member_t/index.html +++ b/docs/disml/Disml/Member_t/index.html @@ -1,2 +1,2 @@ -Member_t (disml.Disml.Member_t)

Module Disml.Member_t

type partial_member = {
nick : string option;
roles : Snowflake.t list;
joined_at : string;
deaf : bool;
mute : bool;
}
val partial_member_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> partial_member
val sexp_of_partial_member : partial_member -> Ppx_sexp_conv_lib.Sexp.t
val partial_member_to_yojson : partial_member -> Yojson.Safe.json
val partial_member_of_yojson : Yojson.Safe.json -> partial_member Ppx_deriving_yojson_runtime.error_or
val _ : partial_member -> Yojson.Safe.json
val _ : Yojson.Safe.json -> partial_member Ppx_deriving_yojson_runtime.error_or
val partial_member_of_yojson_exn : Yojson.Safe.json -> partial_member
val _ : Yojson.Safe.json -> partial_member
type member = {
nick : string option;
roles : Snowflake.t list;
joined_at : string;
deaf : bool;
mute : bool;
user : User_t.t;
}
val member_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> member
val sexp_of_member : member -> Ppx_sexp_conv_lib.Sexp.t
val member_to_yojson : member -> Yojson.Safe.json
val member_of_yojson : Yojson.Safe.json -> member Ppx_deriving_yojson_runtime.error_or
val _ : member -> Yojson.Safe.json
val _ : Yojson.Safe.json -> member Ppx_deriving_yojson_runtime.error_or
val member_of_yojson_exn : Yojson.Safe.json -> member
val _ : Yojson.Safe.json -> member
type member_wrapper = {
guild_id : Snowflake.t;
user : User_t.t;
}
val member_wrapper_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> member_wrapper
val sexp_of_member_wrapper : member_wrapper -> Ppx_sexp_conv_lib.Sexp.t
val member_wrapper_to_yojson : member_wrapper -> Yojson.Safe.json
val member_wrapper_of_yojson : Yojson.Safe.json -> member_wrapper Ppx_deriving_yojson_runtime.error_or
val _ : member_wrapper -> Yojson.Safe.json
val _ : Yojson.Safe.json -> member_wrapper Ppx_deriving_yojson_runtime.error_or
val member_wrapper_of_yojson_exn : Yojson.Safe.json -> member_wrapper
val _ : Yojson.Safe.json -> member_wrapper
type member_update = {
guild_id : Snowflake.t;
roles : Snowflake.t list;
user : User_t.t;
nick : string option;
}
val member_update_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> member_update
val sexp_of_member_update : member_update -> Ppx_sexp_conv_lib.Sexp.t
val member_update_to_yojson : member_update -> Yojson.Safe.json
val member_update_of_yojson : Yojson.Safe.json -> member_update Ppx_deriving_yojson_runtime.error_or
val _ : member_update -> Yojson.Safe.json
val _ : Yojson.Safe.json -> member_update Ppx_deriving_yojson_runtime.error_or
val member_update_of_yojson_exn : Yojson.Safe.json -> member_update
val _ : Yojson.Safe.json -> member_update
type t = {
nick : string option;
roles : Snowflake.t list;
joined_at : string;
deaf : bool;
mute : bool;
user : User_t.t;
guild_id : Snowflake.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
val wrap : guild_id:Snowflake.t -> member -> t
\ No newline at end of file +Member_t (disml.Disml.Member_t)

Module Disml.Member_t

type partial_member = {
nick : string option;
roles : Snowflake.t list;
joined_at : string;
deaf : bool;
mute : bool;
}
val partial_member_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> partial_member
val sexp_of_partial_member : partial_member -> Ppx_sexp_conv_lib.Sexp.t
val partial_member_to_yojson : partial_member -> Yojson.Safe.json
val partial_member_of_yojson : Yojson.Safe.json -> partial_member Ppx_deriving_yojson_runtime.error_or
val partial_member_of_yojson_exn : Yojson.Safe.json -> partial_member
type member = {
nick : string option;
roles : Snowflake.t list;
joined_at : string;
deaf : bool;
mute : bool;
user : User_t.t;
}
val member_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> member
val sexp_of_member : member -> Ppx_sexp_conv_lib.Sexp.t
val member_to_yojson : member -> Yojson.Safe.json
val member_of_yojson : Yojson.Safe.json -> member Ppx_deriving_yojson_runtime.error_or
val member_of_yojson_exn : Yojson.Safe.json -> member
type member_wrapper = {
guild_id : Snowflake.t;
user : User_t.t;
}
val member_wrapper_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> member_wrapper
val sexp_of_member_wrapper : member_wrapper -> Ppx_sexp_conv_lib.Sexp.t
val member_wrapper_to_yojson : member_wrapper -> Yojson.Safe.json
val member_wrapper_of_yojson : Yojson.Safe.json -> member_wrapper Ppx_deriving_yojson_runtime.error_or
val member_wrapper_of_yojson_exn : Yojson.Safe.json -> member_wrapper
type member_update = {
guild_id : Snowflake.t;
roles : Snowflake.t list;
user : User_t.t;
nick : string option;
}
val member_update_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> member_update
val sexp_of_member_update : member_update -> Ppx_sexp_conv_lib.Sexp.t
val member_update_to_yojson : member_update -> Yojson.Safe.json
val member_update_of_yojson : Yojson.Safe.json -> member_update Ppx_deriving_yojson_runtime.error_or
val member_update_of_yojson_exn : Yojson.Safe.json -> member_update
type t = {
nick : string option;
roles : Snowflake.t list;
joined_at : string;
deaf : bool;
mute : bool;
user : User_t.t;
guild_id : Snowflake.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val wrap : guild_id:Snowflake.t -> member -> t
\ No newline at end of file diff --git a/docs/disml/Disml/Message/index.html b/docs/disml/Disml/Message/index.html index 4616cd2..48909a6 100644 --- a/docs/disml/Disml/Message/index.html +++ b/docs/disml/Disml/Message/index.html @@ -1,2 +1,2 @@ -Message (disml.Disml.Message)

Module Disml.Message

include module type of Message_t
type message_update = {
id : Snowflake.t;
author : User_t.t option;
channel_id : Snowflake.t;
member : Member_t.partial_member option;
guild_id : Snowflake.t option;
content : string option;
timestamp : string option;
editedimestamp : string option;
tts : bool option;
mention_everyone : bool option;
mentions : Snowflake.t list;
role_mentions : Snowflake.t list;
attachments : Attachment.t list;
embeds : Embed.t list;
reactions : Snowflake.t list;
nonce : Snowflake.t option;
pinned : bool option;
webhook_id : Snowflake.t option;
kind : int option;
}
val message_update_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> message_update
val sexp_of_message_update : message_update -> Ppx_sexp_conv_lib.Sexp.t
val message_update_to_yojson : message_update -> Yojson.Safe.json
val message_update_of_yojson : Yojson.Safe.json -> message_update Ppx_deriving_yojson_runtime.error_or
val _ : message_update -> Yojson.Safe.json
val _ : Yojson.Safe.json -> message_update Ppx_deriving_yojson_runtime.error_or
val message_update_of_yojson_exn : Yojson.Safe.json -> message_update
val _ : Yojson.Safe.json -> message_update
type t = {
id : Snowflake.t;
author : User_t.t;
channel_id : Snowflake.t;
member : Member_t.partial_member option;
guild_id : Snowflake.t option;
content : string;
timestamp : string;
editedimestamp : string option;
tts : bool;
mention_everyone : bool;
attachments : Attachment.t list;
embeds : Embed.t list;
reactions : Snowflake.t list;
nonce : Snowflake.t option;
pinned : bool;
webhook_id : Snowflake.t option;
kind : int;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
val add_reaction : t -> Emoji.t -> unit Async.Deferred.Or_error.t
val remove_reaction : t -> Emoji.t -> User_t.t -> unit Async.Deferred.Or_error.t
val clear_reactions : t -> unit Async.Deferred.Or_error.t
val delete : t -> unit Async.Deferred.Or_error.t
val pin : t -> unit Async.Deferred.Or_error.t
val unpin : t -> unit Async.Deferred.Or_error.t
val reply : t -> string -> t Async.Deferred.Or_error.t
val set_content : t -> string -> t Async.Deferred.Or_error.t
val set_embed : t -> Embed.t -> t Async.Deferred.Or_error.t
\ No newline at end of file +Message (disml.Disml.Message)

Module Disml.Message

include module type of Message_t
type message_update = {
id : Snowflake.t;
author : User_t.t option;
channel_id : Snowflake.t;
member : Member_t.partial_member option;
guild_id : Snowflake.t option;
content : string option;
timestamp : string option;
editedimestamp : string option;
tts : bool option;
mention_everyone : bool option;
mentions : Snowflake.t list;
role_mentions : Snowflake.t list;
attachments : Attachment.t list;
embeds : Embed.t list;
reactions : Snowflake.t list;
nonce : Snowflake.t option;
pinned : bool option;
webhook_id : Snowflake.t option;
kind : int option;
}
val message_update_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> message_update
val sexp_of_message_update : message_update -> Ppx_sexp_conv_lib.Sexp.t
val message_update_to_yojson : message_update -> Yojson.Safe.json
val message_update_of_yojson : Yojson.Safe.json -> message_update Ppx_deriving_yojson_runtime.error_or
val message_update_of_yojson_exn : Yojson.Safe.json -> message_update
type t = {
id : Snowflake.t;
author : User_t.t;
channel_id : Snowflake.t;
member : Member_t.partial_member option;
guild_id : Snowflake.t option;
content : string;
timestamp : string;
editedimestamp : string option;
tts : bool;
mention_everyone : bool;
attachments : Attachment.t list;
embeds : Embed.t list;
reactions : Snowflake.t list;
nonce : Snowflake.t option;
pinned : bool;
webhook_id : Snowflake.t option;
kind : int;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val add_reaction : t -> Emoji.t -> unit Async.Deferred.Or_error.t
val remove_reaction : t -> Emoji.t -> User_t.t -> unit Async.Deferred.Or_error.t
val clear_reactions : t -> unit Async.Deferred.Or_error.t
val delete : t -> unit Async.Deferred.Or_error.t
val pin : t -> unit Async.Deferred.Or_error.t
val unpin : t -> unit Async.Deferred.Or_error.t
val reply : t -> string -> t Async.Deferred.Or_error.t
val reply_with : ?⁠embed:Embed.t -> ?⁠content:string -> ?⁠file:string -> ?⁠tts:bool -> t -> Message_t.t Async.Deferred.Or_error.t
val set_content : t -> string -> t Async.Deferred.Or_error.t
val set_embed : t -> Embed.t -> t Async.Deferred.Or_error.t
\ No newline at end of file diff --git a/docs/disml/Disml/Message_t/index.html b/docs/disml/Disml/Message_t/index.html index c90f2fd..6481bb1 100644 --- a/docs/disml/Disml/Message_t/index.html +++ b/docs/disml/Disml/Message_t/index.html @@ -1,2 +1,2 @@ -Message_t (disml.Disml.Message_t)

Module Disml.Message_t

type message_update = {
id : Snowflake.t;
author : User_t.t option;
channel_id : Snowflake.t;
member : Member_t.partial_member option;
guild_id : Snowflake.t option;
content : string option;
timestamp : string option;
editedimestamp : string option;
tts : bool option;
mention_everyone : bool option;
mentions : Snowflake.t list;
role_mentions : Snowflake.t list;
attachments : Attachment.t list;
embeds : Embed.t list;
reactions : Snowflake.t list;
nonce : Snowflake.t option;
pinned : bool option;
webhook_id : Snowflake.t option;
kind : int option;
}
val message_update_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> message_update
val sexp_of_message_update : message_update -> Ppx_sexp_conv_lib.Sexp.t
val message_update_to_yojson : message_update -> Yojson.Safe.json
val message_update_of_yojson : Yojson.Safe.json -> message_update Ppx_deriving_yojson_runtime.error_or
val _ : message_update -> Yojson.Safe.json
val _ : Yojson.Safe.json -> message_update Ppx_deriving_yojson_runtime.error_or
val message_update_of_yojson_exn : Yojson.Safe.json -> message_update
val _ : Yojson.Safe.json -> message_update
type t = {
id : Snowflake.t;
author : User_t.t;
channel_id : Snowflake.t;
member : Member_t.partial_member option;
guild_id : Snowflake.t option;
content : string;
timestamp : string;
editedimestamp : string option;
tts : bool;
mention_everyone : bool;
attachments : Attachment.t list;
embeds : Embed.t list;
reactions : Snowflake.t list;
nonce : Snowflake.t option;
pinned : bool;
webhook_id : Snowflake.t option;
kind : int;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
\ No newline at end of file +Message_t (disml.Disml.Message_t)

Module Disml.Message_t

type message_update = {
id : Snowflake.t;
author : User_t.t option;
channel_id : Snowflake.t;
member : Member_t.partial_member option;
guild_id : Snowflake.t option;
content : string option;
timestamp : string option;
editedimestamp : string option;
tts : bool option;
mention_everyone : bool option;
mentions : Snowflake.t list;
role_mentions : Snowflake.t list;
attachments : Attachment.t list;
embeds : Embed.t list;
reactions : Snowflake.t list;
nonce : Snowflake.t option;
pinned : bool option;
webhook_id : Snowflake.t option;
kind : int option;
}
val message_update_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> message_update
val sexp_of_message_update : message_update -> Ppx_sexp_conv_lib.Sexp.t
val message_update_to_yojson : message_update -> Yojson.Safe.json
val message_update_of_yojson : Yojson.Safe.json -> message_update Ppx_deriving_yojson_runtime.error_or
val message_update_of_yojson_exn : Yojson.Safe.json -> message_update
type t = {
id : Snowflake.t;
author : User_t.t;
channel_id : Snowflake.t;
member : Member_t.partial_member option;
guild_id : Snowflake.t option;
content : string;
timestamp : string;
editedimestamp : string option;
tts : bool;
mention_everyone : bool;
attachments : Attachment.t list;
embeds : Embed.t list;
reactions : Snowflake.t list;
nonce : Snowflake.t option;
pinned : bool;
webhook_id : Snowflake.t option;
kind : int;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
\ No newline at end of file diff --git a/docs/disml/Disml/Opcode/index.html b/docs/disml/Disml/Opcode/index.html index d225f0a..6db3bb7 100644 --- a/docs/disml/Disml/Opcode/index.html +++ b/docs/disml/Disml/Opcode/index.html @@ -1,2 +1,2 @@ -Opcode (disml.Disml.Opcode)

Module Disml.Opcode

type t =
| DISPATCH
| HEARTBEAT
| IDENTIFY
| STATUS_UPDATE
| VOICE_STATE_UPDATE
| RESUME
| RECONNECT
| REQUEST_GUILD_MEMBERS
| INVALID_SESSION
| HELLO
| HEARTBEAT_ACK
exception Invalid_Opcode of int
val to_int : t -> int
val from_int : int -> t
val to_string : t -> string
\ No newline at end of file +Opcode (disml.Disml.Opcode)

Module Disml.Opcode

type t =
| DISPATCH
| HEARTBEAT
| IDENTIFY
| STATUS_UPDATE
| VOICE_STATE_UPDATE
| RESUME
| RECONNECT
| REQUEST_GUILD_MEMBERS
| INVALID_SESSION
| HELLO
| HEARTBEAT_ACK

Type of known opcodes.

exception Invalid_Opcode of int

Raised when receiving an invalid opcode. This should never occur.

val to_int : t -> int

Converts an opcode to its integer form for outgoing frames.

val from_int : int -> t

Converts an integer to an opcode for incoming frames. Raise Invalid_Opcode Raised when an unkown opcode is received.

val to_string : t -> string

Converts and opcode to a human-readable string. Used for logging purposes.

\ No newline at end of file diff --git a/docs/disml/Disml/Presence/index.html b/docs/disml/Disml/Presence/index.html index c521305..5a94610 100644 --- a/docs/disml/Disml/Presence/index.html +++ b/docs/disml/Disml/Presence/index.html @@ -1,2 +1,2 @@ -Presence (disml.Disml.Presence)

Module Disml.Presence

type t = {
user : User_t.partial_user;
roles : Snowflake.t list;
game : Activity.t option;
guild_id : Snowflake.t;
status : string;
activities : Activity.t list;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
\ No newline at end of file +Presence (disml.Disml.Presence)

Module Disml.Presence

type t = {
user : User_t.partial_user;
roles : Snowflake.t list;
game : Activity.t option;
guild_id : Snowflake.t;
status : string;
activities : Activity.t list;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
\ No newline at end of file diff --git a/docs/disml/Disml/Reaction/index.html b/docs/disml/Disml/Reaction/index.html index 38300ae..23f5ba6 100644 --- a/docs/disml/Disml/Reaction/index.html +++ b/docs/disml/Disml/Reaction/index.html @@ -1,2 +1,2 @@ -Reaction (disml.Disml.Reaction)

Module Disml.Reaction

include module type of Reaction_t
type reaction_event = {
user_id : Snowflake.t;
channel_id : Snowflake.t;
message_id : Snowflake.t;
guild_id : Snowflake.t option;
emoji : Emoji.partial_emoji;
}
val reaction_event_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> reaction_event
val sexp_of_reaction_event : reaction_event -> Ppx_sexp_conv_lib.Sexp.t
val reaction_event_to_yojson : reaction_event -> Yojson.Safe.json
val reaction_event_of_yojson : Yojson.Safe.json -> reaction_event Ppx_deriving_yojson_runtime.error_or
val _ : reaction_event -> Yojson.Safe.json
val _ : Yojson.Safe.json -> reaction_event Ppx_deriving_yojson_runtime.error_or
val reaction_event_of_yojson_exn : Yojson.Safe.json -> reaction_event
val _ : Yojson.Safe.json -> reaction_event
type t = {
count : int;
emoji : Emoji.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
\ No newline at end of file +Reaction (disml.Disml.Reaction)

Module Disml.Reaction

include module type of Reaction_t
type reaction_event = {
user_id : Snowflake.t;
channel_id : Snowflake.t;
message_id : Snowflake.t;
guild_id : Snowflake.t option;
emoji : Emoji.partial_emoji;
}
val reaction_event_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> reaction_event
val sexp_of_reaction_event : reaction_event -> Ppx_sexp_conv_lib.Sexp.t
val reaction_event_to_yojson : reaction_event -> Yojson.Safe.json
val reaction_event_of_yojson : Yojson.Safe.json -> reaction_event Ppx_deriving_yojson_runtime.error_or
val reaction_event_of_yojson_exn : Yojson.Safe.json -> reaction_event
type t = {
count : int;
emoji : Emoji.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
\ No newline at end of file diff --git a/docs/disml/Disml/Reaction_t/index.html b/docs/disml/Disml/Reaction_t/index.html index 23e0bd2..9dea0c8 100644 --- a/docs/disml/Disml/Reaction_t/index.html +++ b/docs/disml/Disml/Reaction_t/index.html @@ -1,2 +1,2 @@ -Reaction_t (disml.Disml.Reaction_t)

Module Disml.Reaction_t

type reaction_event = {
user_id : Snowflake.t;
channel_id : Snowflake.t;
message_id : Snowflake.t;
guild_id : Snowflake.t option;
emoji : Emoji.partial_emoji;
}
val reaction_event_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> reaction_event
val sexp_of_reaction_event : reaction_event -> Ppx_sexp_conv_lib.Sexp.t
val reaction_event_to_yojson : reaction_event -> Yojson.Safe.json
val reaction_event_of_yojson : Yojson.Safe.json -> reaction_event Ppx_deriving_yojson_runtime.error_or
val _ : reaction_event -> Yojson.Safe.json
val _ : Yojson.Safe.json -> reaction_event Ppx_deriving_yojson_runtime.error_or
val reaction_event_of_yojson_exn : Yojson.Safe.json -> reaction_event
val _ : Yojson.Safe.json -> reaction_event
type t = {
count : int;
emoji : Emoji.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
\ No newline at end of file +Reaction_t (disml.Disml.Reaction_t)

Module Disml.Reaction_t

type reaction_event = {
user_id : Snowflake.t;
channel_id : Snowflake.t;
message_id : Snowflake.t;
guild_id : Snowflake.t option;
emoji : Emoji.partial_emoji;
}
val reaction_event_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> reaction_event
val sexp_of_reaction_event : reaction_event -> Ppx_sexp_conv_lib.Sexp.t
val reaction_event_to_yojson : reaction_event -> Yojson.Safe.json
val reaction_event_of_yojson : Yojson.Safe.json -> reaction_event Ppx_deriving_yojson_runtime.error_or
val reaction_event_of_yojson_exn : Yojson.Safe.json -> reaction_event
type t = {
count : int;
emoji : Emoji.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
\ No newline at end of file diff --git a/docs/disml/Disml/Rl/RouteMap/index.html b/docs/disml/Disml/Rl/RouteMap/index.html index 5a17234..4320fdb 100644 --- a/docs/disml/Disml/Rl/RouteMap/index.html +++ b/docs/disml/Disml/Rl/RouteMap/index.html @@ -1,2 +1,2 @@ -RouteMap (disml.Disml.Rl.RouteMap)

Module Rl.RouteMap

module Key : sig ... end
module Tree : sig ... end
type 'a t = (Key.t'aKey.comparator_witness) Core_kernel__.Map_intf.Map.t
val compare : ('a -> 'a -> Core_kernel__.Import.int) -> 'a t -> 'a t -> Core_kernel__.Import.int
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist : (Key.t * 'a) list -> [ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error : (Key.t * 'a) list -> 'a t Base__.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold : (Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce : (Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array : (Key.t * 'a) array -> 'a t Base__.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_increasing_iterator_unchecked : len:int -> f:(int -> Key.t * 'a) -> 'a t
val of_increasing_sequence : (Key.t * 'a) Base__.Sequence.t -> 'a t Base__.Or_error.t
val of_iteri : iteri:(f:(key:Key.t -> data:'v -> unit) -> unit) -> [ `Duplicate_key of Key.t | `Ok of 'v t ]
val of_tree : 'a Tree.t -> 'a t
val of_hashtbl_exn : (Key.t'a) Core_kernel__.Hashtbl.t -> 'a t
val gen : Key.t Core_kernel__.Quickcheck.Generator.t -> 'a Core_kernel__.Quickcheck.Generator.t -> 'a t Core_kernel__.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t Base__.Map_intf.Or_duplicate.t
val add_exn : 'a t -> key:Key.t -> data:'a -> 'a t
val set : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val remove_multi : 'a list t -> Key.t -> 'a list t
val find_multi : 'a list t -> Key.t -> 'a list
val change : 'a t -> Key.t -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> Key.t -> f:('a option -> 'a) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter_keys : 'a t -> f:(Key.t -> unit) -> unit
val iter : 'a t -> f:('a -> unit) -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 : 'a t -> 'b t -> f:(key:Key.t -> data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] -> unit) -> unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold : 'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right : 'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold2 : 'a t -> 'b t -> init:'c -> f:(key:Key.t -> data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] -> 'c -> 'c) -> 'c
val filter_keys : 'a t -> f:(Key.t -> bool) -> 'a t
val filter : 'a t -> f:('a -> bool) -> 'a t
val filteri : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val partition_mapi : 'a t -> f:(key:Key.t -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partition_map : 'a t -> f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : ?⁠key_order:[ `Decreasing | `Increasing ] -> 'a t -> (Key.t * 'a) list
val validate : name:(Key.t -> string) -> 'a Base__.Validate.check -> 'a t Base__.Validate.check
val merge : 'a t -> 'b t -> f:(key:Key.t -> [ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] -> 'c option) -> 'c t
val symmetric_diff : 'a t -> 'a t -> data_equal:('a -> 'a -> bool) -> (Key.t'a) Base__.Map_intf.Symmetric_diff_element.t Base__.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli : 'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi : 'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti : 'a t -> f:(key:Key.t -> data:'a -> bool) -> int
val split : 'a t -> Key.t -> 'a t * (Key.t * 'a) option * 'a t
val append : lower_part:'a t -> upper_part:'a t -> [ `Ok of 'a t | `Overlapping_key_ranges ]
val subrange : 'a t -> lower_bound:Key.t Base__.Maybe_bound.t -> upper_bound:Key.t Base__.Maybe_bound.t -> 'a t
val fold_range_inclusive : 'a t -> min:Key.t -> max:Key.t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist : 'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val closest_key : 'a t -> [ `Greater_or_equal_to | `Greater_than | `Less_or_equal_to | `Less_than ] -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val nth_exn : 'a t -> int -> Key.t * 'a
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence : ?⁠order:[ `Decreasing_key | `Increasing_key ] -> ?⁠keys_greater_or_equal_to:Key.t -> ?⁠keys_less_or_equal_to:Key.t -> 'a t -> (Key.t * 'a) Base__.Sequence.t
val obs : Key.t Core_kernel__.Quickcheck.Observer.t -> 'v Core_kernel__.Quickcheck.Observer.t -> 'v t Core_kernel__.Quickcheck.Observer.t
val shrinker : Key.t Core_kernel__.Quickcheck.Shrinker.t -> 'v Core_kernel__.Quickcheck.Shrinker.t -> 'v t Core_kernel__.Quickcheck.Shrinker.t
module Provide_of_sexp : functor (Key : sig ... end) -> sig ... end
module Provide_bin_io : functor (Key : sig ... end) -> sig ... end
module Provide_hash : functor (Key : sig ... end) -> sig ... end
val t_of_sexp : (Base__.Ppx_sexp_conv_lib.Sexp.t -> 'a) -> Base__.Ppx_sexp_conv_lib.Sexp.t -> 'a t
val sexp_of_t : ('a -> Base__.Ppx_sexp_conv_lib.Sexp.t) -> 'a t -> Base__.Ppx_sexp_conv_lib.Sexp.t
\ No newline at end of file +RouteMap (disml.Disml.Rl.RouteMap)

Module Rl.RouteMap

Type for mapping route -> rl.

module Key : sig ... end
module Tree : sig ... end
type 'a t = (Key.t'aKey.comparator_witness) Core_kernel__.Map_intf.Map.t
val compare : ('a -> 'a -> Core_kernel__.Import.int) -> 'a t -> 'a t -> Core_kernel__.Import.int
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist : (Key.t * 'a) list -> [ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error : (Key.t * 'a) list -> 'a t Base__.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold : (Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce : (Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array : (Key.t * 'a) array -> 'a t Base__.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_increasing_iterator_unchecked : len:int -> f:(int -> Key.t * 'a) -> 'a t
val of_increasing_sequence : (Key.t * 'a) Base__.Sequence.t -> 'a t Base__.Or_error.t
val of_iteri : iteri:(f:(key:Key.t -> data:'v -> unit) -> unit) -> [ `Duplicate_key of Key.t | `Ok of 'v t ]
val of_tree : 'a Tree.t -> 'a t
val of_hashtbl_exn : (Key.t'a) Core_kernel__.Hashtbl.t -> 'a t
val gen : Key.t Core_kernel__.Quickcheck.Generator.t -> 'a Core_kernel__.Quickcheck.Generator.t -> 'a t Core_kernel__.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t Base__.Map_intf.Or_duplicate.t
val add_exn : 'a t -> key:Key.t -> data:'a -> 'a t
val set : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val remove_multi : 'a list t -> Key.t -> 'a list t
val find_multi : 'a list t -> Key.t -> 'a list
val change : 'a t -> Key.t -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> Key.t -> f:('a option -> 'a) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter_keys : 'a t -> f:(Key.t -> unit) -> unit
val iter : 'a t -> f:('a -> unit) -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 : 'a t -> 'b t -> f:(key:Key.t -> data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] -> unit) -> unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold : 'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right : 'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold2 : 'a t -> 'b t -> init:'c -> f:(key:Key.t -> data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] -> 'c -> 'c) -> 'c
val filter_keys : 'a t -> f:(Key.t -> bool) -> 'a t
val filter : 'a t -> f:('a -> bool) -> 'a t
val filteri : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val partition_mapi : 'a t -> f:(key:Key.t -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partition_map : 'a t -> f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : ?⁠key_order:[ `Decreasing | `Increasing ] -> 'a t -> (Key.t * 'a) list
val validate : name:(Key.t -> string) -> 'a Base__.Validate.check -> 'a t Base__.Validate.check
val merge : 'a t -> 'b t -> f:(key:Key.t -> [ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] -> 'c option) -> 'c t
val symmetric_diff : 'a t -> 'a t -> data_equal:('a -> 'a -> bool) -> (Key.t'a) Base__.Map_intf.Symmetric_diff_element.t Base__.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli : 'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi : 'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti : 'a t -> f:(key:Key.t -> data:'a -> bool) -> int
val split : 'a t -> Key.t -> 'a t * (Key.t * 'a) option * 'a t
val append : lower_part:'a t -> upper_part:'a t -> [ `Ok of 'a t | `Overlapping_key_ranges ]
val subrange : 'a t -> lower_bound:Key.t Base__.Maybe_bound.t -> upper_bound:Key.t Base__.Maybe_bound.t -> 'a t
val fold_range_inclusive : 'a t -> min:Key.t -> max:Key.t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist : 'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val closest_key : 'a t -> [ `Greater_or_equal_to | `Greater_than | `Less_or_equal_to | `Less_than ] -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val nth_exn : 'a t -> int -> Key.t * 'a
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence : ?⁠order:[ `Decreasing_key | `Increasing_key ] -> ?⁠keys_greater_or_equal_to:Key.t -> ?⁠keys_less_or_equal_to:Key.t -> 'a t -> (Key.t * 'a) Base__.Sequence.t
val obs : Key.t Core_kernel__.Quickcheck.Observer.t -> 'v Core_kernel__.Quickcheck.Observer.t -> 'v t Core_kernel__.Quickcheck.Observer.t
val shrinker : Key.t Core_kernel__.Quickcheck.Shrinker.t -> 'v Core_kernel__.Quickcheck.Shrinker.t -> 'v t Core_kernel__.Quickcheck.Shrinker.t
module Provide_of_sexp : functor (Key : sig ... end) -> sig ... end
module Provide_bin_io : functor (Key : sig ... end) -> sig ... end
module Provide_hash : functor (Key : sig ... end) -> sig ... end
val t_of_sexp : (Base__.Ppx_sexp_conv_lib.Sexp.t -> 'a) -> Base__.Ppx_sexp_conv_lib.Sexp.t -> 'a t
val sexp_of_t : ('a -> Base__.Ppx_sexp_conv_lib.Sexp.t) -> 'a t -> Base__.Ppx_sexp_conv_lib.Sexp.t
\ No newline at end of file diff --git a/docs/disml/Disml/Rl/index.html b/docs/disml/Disml/Rl/index.html index f54ccda..a4527ce 100644 --- a/docs/disml/Disml/Rl/index.html +++ b/docs/disml/Disml/Rl/index.html @@ -1,2 +1,2 @@ -Rl (disml.Disml.Rl)

Module Disml.Rl

module RouteMap : module type of sig ... end
type rl = {
limit : int;
remaining : int;
reset : int;
}
type t = (rl, Core.read_write) Async.Mvar.t RouteMap.t
val rl_of_header : Cohttp.Header.t -> rl option
val default : rl
val empty : t
val update : 'a RouteMap.t -> string -> f:('a option -> 'a) -> 'a RouteMap.t
val find : 'a RouteMap.t -> string -> 'a option
val find_exn : 'a RouteMap.t -> string -> 'a
\ No newline at end of file +Rl (disml.Disml.Rl)

Module Disml.Rl

module RouteMap : module type of sig ... end

Type for mapping route -> rl.

type rl = {
limit : int;
remaining : int;
reset : int;
}

Type representing ratelimit information.

type t = (rl, Core.read_write) Async.Mvar.t RouteMap.t

Type representing the specific case of RouteMap.

val rl_of_header : Cohttp.Header.t -> rl option

Converts Cohttp header data into ratelimit information.

returns

Some of ratelimit information or None on bad headers

val default : rl

Default for type rl. Used for prepopulating routes.

val empty : t

Empty ratelimit route map.

val update : 'a RouteMap.t -> string -> f:('a option -> 'a) -> 'a RouteMap.t

Analogous to RouteMap.update.

val find : 'a RouteMap.t -> string -> 'a option

Analogous to RouteMap.find.

val find_exn : 'a RouteMap.t -> string -> 'a

Analogous to RouteMap.find_exn.

\ No newline at end of file diff --git a/docs/disml/Disml/Role/index.html b/docs/disml/Disml/Role/index.html index 278706d..c1aa27a 100644 --- a/docs/disml/Disml/Role/index.html +++ b/docs/disml/Disml/Role/index.html @@ -1,2 +1,2 @@ -Role (disml.Disml.Role)

Module Disml.Role

include module type of Role_t
type role = {
id : Snowflake.t;
name : string;
colour : int;
hoist : bool;
position : int;
permissions : int;
managed : bool;
mentionable : bool;
}
val role_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> role
val sexp_of_role : role -> Ppx_sexp_conv_lib.Sexp.t
val role_to_yojson : role -> Yojson.Safe.json
val role_of_yojson : Yojson.Safe.json -> role Ppx_deriving_yojson_runtime.error_or
val _ : role -> Yojson.Safe.json
val _ : Yojson.Safe.json -> role Ppx_deriving_yojson_runtime.error_or
val role_of_yojson_exn : Yojson.Safe.json -> role
val _ : Yojson.Safe.json -> role
type role_update = {
role : role;
guild_id : Snowflake.t;
}
val role_update_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> role_update
val sexp_of_role_update : role_update -> Ppx_sexp_conv_lib.Sexp.t
val role_update_to_yojson : role_update -> Yojson.Safe.json
val role_update_of_yojson : Yojson.Safe.json -> role_update Ppx_deriving_yojson_runtime.error_or
val _ : role_update -> Yojson.Safe.json
val _ : Yojson.Safe.json -> role_update Ppx_deriving_yojson_runtime.error_or
val role_update_of_yojson_exn : Yojson.Safe.json -> role_update
val _ : Yojson.Safe.json -> role_update
type t = {
id : Snowflake.t;
name : string;
colour : int;
hoist : bool;
position : int;
permissions : int;
managed : bool;
mentionable : bool;
guild_id : Snowflake.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
val wrap : guild_id:Snowflake.t -> role -> t
val allow_mention : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val delete : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val disallow_mention : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val hoist : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val set_colour : colour:int -> t -> Yojson.Safe.json Async.Deferred.Or_error.t
val set_name : name:string -> t -> Yojson.Safe.json Async.Deferred.Or_error.t
val unhoist : t -> Yojson.Safe.json Async.Deferred.Or_error.t
\ No newline at end of file +Role (disml.Disml.Role)

Module Disml.Role

include module type of Role_t
type role = {
id : Snowflake.t;
name : string;
colour : int;
hoist : bool;
position : int;
permissions : int;
managed : bool;
mentionable : bool;
}
val role_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> role
val sexp_of_role : role -> Ppx_sexp_conv_lib.Sexp.t
val role_to_yojson : role -> Yojson.Safe.json
val role_of_yojson : Yojson.Safe.json -> role Ppx_deriving_yojson_runtime.error_or
val role_of_yojson_exn : Yojson.Safe.json -> role
type role_update = {
role : role;
guild_id : Snowflake.t;
}
val role_update_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> role_update
val sexp_of_role_update : role_update -> Ppx_sexp_conv_lib.Sexp.t
val role_update_to_yojson : role_update -> Yojson.Safe.json
val role_update_of_yojson : Yojson.Safe.json -> role_update Ppx_deriving_yojson_runtime.error_or
val role_update_of_yojson_exn : Yojson.Safe.json -> role_update
type t = {
id : Snowflake.t;
name : string;
colour : int;
hoist : bool;
position : int;
permissions : int;
managed : bool;
mentionable : bool;
guild_id : Snowflake.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val wrap : guild_id:Snowflake.t -> role -> t
val allow_mention : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val delete : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val disallow_mention : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val hoist : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val set_colour : colour:int -> t -> Yojson.Safe.json Async.Deferred.Or_error.t
val set_name : name:string -> t -> Yojson.Safe.json Async.Deferred.Or_error.t
val unhoist : t -> Yojson.Safe.json Async.Deferred.Or_error.t
\ No newline at end of file diff --git a/docs/disml/Disml/Role_t/index.html b/docs/disml/Disml/Role_t/index.html index 3af6846..96ad007 100644 --- a/docs/disml/Disml/Role_t/index.html +++ b/docs/disml/Disml/Role_t/index.html @@ -1,2 +1,2 @@ -Role_t (disml.Disml.Role_t)

Module Disml.Role_t

type role = {
id : Snowflake.t;
name : string;
colour : int;
hoist : bool;
position : int;
permissions : int;
managed : bool;
mentionable : bool;
}
val role_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> role
val sexp_of_role : role -> Ppx_sexp_conv_lib.Sexp.t
val role_to_yojson : role -> Yojson.Safe.json
val role_of_yojson : Yojson.Safe.json -> role Ppx_deriving_yojson_runtime.error_or
val _ : role -> Yojson.Safe.json
val _ : Yojson.Safe.json -> role Ppx_deriving_yojson_runtime.error_or
val role_of_yojson_exn : Yojson.Safe.json -> role
val _ : Yojson.Safe.json -> role
type role_update = {
role : role;
guild_id : Snowflake.t;
}
val role_update_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> role_update
val sexp_of_role_update : role_update -> Ppx_sexp_conv_lib.Sexp.t
val role_update_to_yojson : role_update -> Yojson.Safe.json
val role_update_of_yojson : Yojson.Safe.json -> role_update Ppx_deriving_yojson_runtime.error_or
val _ : role_update -> Yojson.Safe.json
val _ : Yojson.Safe.json -> role_update Ppx_deriving_yojson_runtime.error_or
val role_update_of_yojson_exn : Yojson.Safe.json -> role_update
val _ : Yojson.Safe.json -> role_update
type t = {
id : Snowflake.t;
name : string;
colour : int;
hoist : bool;
position : int;
permissions : int;
managed : bool;
mentionable : bool;
guild_id : Snowflake.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
val wrap : guild_id:Snowflake.t -> role -> t
\ No newline at end of file +Role_t (disml.Disml.Role_t)

Module Disml.Role_t

type role = {
id : Snowflake.t;
name : string;
colour : int;
hoist : bool;
position : int;
permissions : int;
managed : bool;
mentionable : bool;
}
val role_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> role
val sexp_of_role : role -> Ppx_sexp_conv_lib.Sexp.t
val role_to_yojson : role -> Yojson.Safe.json
val role_of_yojson : Yojson.Safe.json -> role Ppx_deriving_yojson_runtime.error_or
val role_of_yojson_exn : Yojson.Safe.json -> role
type role_update = {
role : role;
guild_id : Snowflake.t;
}
val role_update_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> role_update
val sexp_of_role_update : role_update -> Ppx_sexp_conv_lib.Sexp.t
val role_update_to_yojson : role_update -> Yojson.Safe.json
val role_update_of_yojson : Yojson.Safe.json -> role_update Ppx_deriving_yojson_runtime.error_or
val role_update_of_yojson_exn : Yojson.Safe.json -> role_update
type t = {
id : Snowflake.t;
name : string;
colour : int;
hoist : bool;
position : int;
permissions : int;
managed : bool;
mentionable : bool;
guild_id : Snowflake.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val wrap : guild_id:Snowflake.t -> role -> t
\ No newline at end of file diff --git a/docs/disml/Disml/Sharder/Shard/index.html b/docs/disml/Disml/Sharder/Shard/index.html index 264a819..3ae7f28 100644 --- a/docs/disml/Disml/Sharder/Shard/index.html +++ b/docs/disml/Disml/Sharder/Shard/index.html @@ -1,2 +1,2 @@ -Shard (disml.Disml.Sharder.Shard)

Module Sharder.Shard

type shard
type 'a t = {
mutable state : 'a;
}
val heartbeat : shard -> shard Async.Deferred.t
val set_status : status:Yojson.Safe.json -> shard -> shard Async.Deferred.t
val request_guild_members : ?⁠query:string -> ?⁠limit:int -> guild:Snowflake.t -> shard -> shard Async.Deferred.t
val create : url:string -> shards:(int * int) -> unit -> shard Async.Deferred.t
\ No newline at end of file +Shard (disml.Disml.Sharder.Shard)

Module Sharder.Shard

Module representing a single shard.

type shard = {
hb_interval : Core.Time.Span.t Async.Ivar.t;

Time span between heartbeats, wrapped in an Ivar.

seq : int;

Current sequence number

session : string option;

Session id, if one exists.

pipe : Websocket_async.Frame.t Async.Pipe.Reader.t * Websocket_async.Frame.t Async.Pipe.Writer.t;

Raw frame IO pipe used for websocket communications.

ready : unit Async.Ivar.t;

A simple Ivar indicating if the shard has received READY.

url : string;

The websocket URL in use.

id : int * int;

A tuple as expected by Discord. First element is the current shard index, second element is the total shard count.

}

Representation of the state of a shard.

Wrapper around an internal state, used to wrap shard.

type 'a t = {
mutable state : 'a;
}

Wrapper around an internal state, used to wrap shard.

val heartbeat : shard -> shard Async.Deferred.t

Send a heartbeat to Discord. This is handled automatically.

val set_status : status:Yojson.Safe.json -> shard -> shard Async.Deferred.t

Set the status of the shard.

val request_guild_members : ?⁠query:string -> ?⁠limit:int -> guild:Snowflake.t -> shard -> shard Async.Deferred.t

Request guild members for the shard's guild. Causes dispatch of multiple member chunk events.

val create : url:string -> shards:(int * int) -> unit -> shard Async.Deferred.t

Create a new shard

\ No newline at end of file diff --git a/docs/disml/Disml/Sharder/index.html b/docs/disml/Disml/Sharder/index.html index 409ecf3..c485dbd 100644 --- a/docs/disml/Disml/Sharder/index.html +++ b/docs/disml/Disml/Sharder/index.html @@ -1,2 +1,2 @@ -Sharder (disml.Disml.Sharder)

Module Disml.Sharder

exception Invalid_Payload
exception Failure_to_Establish_Heartbeat
type t
val start : ?⁠count:int -> unit -> t Async.Deferred.t
module Shard : sig ... end
val set_status : status:Yojson.Safe.json -> t -> Shard.shard list Async.Deferred.t
val set_status_with : f:(Shard.shard -> Yojson.Safe.json) -> t -> Shard.shard list Async.Deferred.t
val request_guild_members : ?⁠query:string -> ?⁠limit:int -> guild:Snowflake.t -> t -> Shard.shard list Async.Deferred.t
\ No newline at end of file +Sharder (disml.Disml.Sharder)

Module Disml.Sharder

exception Invalid_Payload
exception Failure_to_Establish_Heartbeat
type t
val start : ?⁠count:int -> unit -> t Async.Deferred.t

Start the Sharder. This is called by Client.start.

module Shard : sig ... end

Module representing a single shard.

val set_status : status:Yojson.Safe.json -> t -> Shard.shard list Async.Deferred.t

Calls Shard.set_status for each shard registered with the sharder.

val set_status_with : f:(Shard.shard -> Yojson.Safe.json) -> t -> Shard.shard list Async.Deferred.t

Like set_status but takes a function with a shard as its parameter and json for its return.

val request_guild_members : ?⁠query:string -> ?⁠limit:int -> guild:Snowflake.t -> t -> Shard.shard list Async.Deferred.t

Calls Shard.request_guild_members for each shard registered with the sharder.

\ No newline at end of file diff --git a/docs/disml/Disml/Snowflake/index.html b/docs/disml/Disml/Snowflake/index.html index 0df20e3..1d65624 100644 --- a/docs/disml/Disml/Snowflake/index.html +++ b/docs/disml/Disml/Snowflake/index.html @@ -1,2 +1,2 @@ -Snowflake (disml.Disml.Snowflake)

Module Disml.Snowflake

type t = Core.Int.t
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val of_yojson_exn : Yojson.Safe.json -> Core.Int.t
val of_yojson : Yojson.Safe.json -> (Core.Int.t, string) Core._result
val to_yojson : Core.Int.t -> Yojson.Safe.json
val timestamp : int -> int
val timestamp_iso : int -> string
\ No newline at end of file +Snowflake (disml.Disml.Snowflake)

Module Disml.Snowflake

type t = Core.Int.t
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val of_yojson_exn : Yojson.Safe.json -> t
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val to_yojson : t -> Yojson.Safe.json
val timestamp : t -> int
val timestamp_iso : t -> string
\ No newline at end of file diff --git a/docs/disml/Disml/User/index.html b/docs/disml/Disml/User/index.html index 4dc4915..751caa6 100644 --- a/docs/disml/Disml/User/index.html +++ b/docs/disml/Disml/User/index.html @@ -1,2 +1,2 @@ -User (disml.Disml.User)

Module Disml.User

include module type of User_t
type partial_user = {
id : Snowflake.t;
}
val partial_user_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> partial_user
val sexp_of_partial_user : partial_user -> Ppx_sexp_conv_lib.Sexp.t
val partial_user_to_yojson : partial_user -> Yojson.Safe.json
val partial_user_of_yojson : Yojson.Safe.json -> partial_user Ppx_deriving_yojson_runtime.error_or
val _ : partial_user -> Yojson.Safe.json
val _ : Yojson.Safe.json -> partial_user Ppx_deriving_yojson_runtime.error_or
val partial_user_of_yojson_exn : Yojson.Safe.json -> partial_user
val _ : Yojson.Safe.json -> partial_user
type t = {
id : Snowflake.t;
username : string;
discriminator : string;
avatar : string option;
bot : bool;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
val tag : t -> string
val mention : t -> string
val default_avatar : t -> string
val face : t -> string
\ No newline at end of file +User (disml.Disml.User)

Module Disml.User

include module type of User_t
type partial_user = {
id : Snowflake.t;
}
val partial_user_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> partial_user
val sexp_of_partial_user : partial_user -> Ppx_sexp_conv_lib.Sexp.t
val partial_user_to_yojson : partial_user -> Yojson.Safe.json
val partial_user_of_yojson : Yojson.Safe.json -> partial_user Ppx_deriving_yojson_runtime.error_or
val partial_user_of_yojson_exn : Yojson.Safe.json -> partial_user
type t = {
id : Snowflake.t;
username : string;
discriminator : string;
avatar : string option;
bot : bool;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val tag : t -> string
val mention : t -> string
val default_avatar : t -> string
val face : t -> string
\ No newline at end of file diff --git a/docs/disml/Disml/User_t/index.html b/docs/disml/Disml/User_t/index.html index 4a0a315..e800d5b 100644 --- a/docs/disml/Disml/User_t/index.html +++ b/docs/disml/Disml/User_t/index.html @@ -1,2 +1,2 @@ -User_t (disml.Disml.User_t)

Module Disml.User_t

type partial_user = {
id : Snowflake.t;
}
val partial_user_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> partial_user
val sexp_of_partial_user : partial_user -> Ppx_sexp_conv_lib.Sexp.t
val partial_user_to_yojson : partial_user -> Yojson.Safe.json
val partial_user_of_yojson : Yojson.Safe.json -> partial_user Ppx_deriving_yojson_runtime.error_or
val _ : partial_user -> Yojson.Safe.json
val _ : Yojson.Safe.json -> partial_user Ppx_deriving_yojson_runtime.error_or
val partial_user_of_yojson_exn : Yojson.Safe.json -> partial_user
val _ : Yojson.Safe.json -> partial_user
type t = {
id : Snowflake.t;
username : string;
discriminator : string;
avatar : string option;
bot : bool;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
\ No newline at end of file +User_t (disml.Disml.User_t)

Module Disml.User_t

type partial_user = {
id : Snowflake.t;
}
val partial_user_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> partial_user
val sexp_of_partial_user : partial_user -> Ppx_sexp_conv_lib.Sexp.t
val partial_user_to_yojson : partial_user -> Yojson.Safe.json
val partial_user_of_yojson : Yojson.Safe.json -> partial_user Ppx_deriving_yojson_runtime.error_or
val partial_user_of_yojson_exn : Yojson.Safe.json -> partial_user
type t = {
id : Snowflake.t;
username : string;
discriminator : string;
avatar : string option;
bot : bool;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
\ No newline at end of file diff --git a/docs/disml/Disml__Activity/index.html b/docs/disml/Disml__Activity/index.html index e5dadb0..641b8a4 100644 --- a/docs/disml/Disml__Activity/index.html +++ b/docs/disml/Disml__Activity/index.html @@ -1,2 +1,2 @@ -Disml__Activity (disml.Disml__Activity)

Module Disml__Activity

type t = {
name : string;
kind : int;
url : string;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
\ No newline at end of file +Disml__Activity (disml.Disml__Activity)

Module Disml__Activity

type t = {
name : string;
kind : int;
url : string;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
\ No newline at end of file diff --git a/docs/disml/Disml__Attachment/index.html b/docs/disml/Disml__Attachment/index.html index 8f8d225..38086fe 100644 --- a/docs/disml/Disml__Attachment/index.html +++ b/docs/disml/Disml__Attachment/index.html @@ -1,2 +1,2 @@ -Disml__Attachment (disml.Disml__Attachment)

Module Disml__Attachment

type t = {
id : Disml.Snowflake.t;
filename : string;
size : int;
url : string;
proxy_url : string;
height : int;
width : int;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
\ No newline at end of file +Disml__Attachment (disml.Disml__Attachment)

Module Disml__Attachment

type t = {
id : Disml.Snowflake.t;
filename : string;
size : int;
url : string;
proxy_url : string;
height : int;
width : int;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
\ No newline at end of file diff --git a/docs/disml/Disml__Ban/index.html b/docs/disml/Disml__Ban/index.html index 63cc6c0..282fb66 100644 --- a/docs/disml/Disml__Ban/index.html +++ b/docs/disml/Disml__Ban/index.html @@ -1,2 +1,2 @@ -Disml__Ban (disml.Disml__Ban)

Module Disml__Ban

include module type of Disml.Ban_t
type t = {
reason : string;
user : Disml.User_t.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
\ No newline at end of file +Disml__Ban (disml.Disml__Ban)

Module Disml__Ban

include module type of Disml.Ban_t
type t = {
reason : string;
user : Disml.User_t.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
\ No newline at end of file diff --git a/docs/disml/Disml__Ban_t/index.html b/docs/disml/Disml__Ban_t/index.html index 428a2bb..fa62235 100644 --- a/docs/disml/Disml__Ban_t/index.html +++ b/docs/disml/Disml__Ban_t/index.html @@ -1,2 +1,2 @@ -Disml__Ban_t (disml.Disml__Ban_t)

Module Disml__Ban_t

type t = {
reason : string;
user : Disml.User_t.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
\ No newline at end of file +Disml__Ban_t (disml.Disml__Ban_t)

Module Disml__Ban_t

type t = {
reason : string;
user : Disml.User_t.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
\ No newline at end of file diff --git a/docs/disml/Disml__Channel/index.html b/docs/disml/Disml__Channel/index.html index 2f17db2..d6bedf1 100644 --- a/docs/disml/Disml__Channel/index.html +++ b/docs/disml/Disml__Channel/index.html @@ -1,2 +1,10 @@ -Disml__Channel (disml.Disml__Channel)

Module Disml__Channel

include module type of Disml.Channel_t
exception Invalid_channel of Yojson.Safe.json
type group = {
id : Disml.Snowflake.t;
last_message_id : Disml.Snowflake.t option;
last_pin_timestamp : string option;
icon : string option;
name : string option;
owner_id : Disml.Snowflake.t;
recipients : Disml.User_t.t list;
}
val group_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> group
val sexp_of_group : group -> Ppx_sexp_conv_lib.Sexp.t
val group_to_yojson : group -> Yojson.Safe.json
val group_of_yojson : Yojson.Safe.json -> group Ppx_deriving_yojson_runtime.error_or
val _ : group -> Yojson.Safe.json
val _ : Yojson.Safe.json -> group Ppx_deriving_yojson_runtime.error_or
val group_of_yojson_exn : Yojson.Safe.json -> group
val _ : Yojson.Safe.json -> group
type dm = {
id : Disml.Snowflake.t;
last_message_id : Disml.Snowflake.t option;
last_pin_timestamp : string option;
}
val dm_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> dm
val sexp_of_dm : dm -> Ppx_sexp_conv_lib.Sexp.t
val dm_to_yojson : dm -> Yojson.Safe.json
val dm_of_yojson : Yojson.Safe.json -> dm Ppx_deriving_yojson_runtime.error_or
val _ : dm -> Yojson.Safe.json
val _ : Yojson.Safe.json -> dm Ppx_deriving_yojson_runtime.error_or
val dm_of_yojson_exn : Yojson.Safe.json -> dm
val _ : Yojson.Safe.json -> dm
type guild_text = {
id : Disml.Snowflake.t;
last_message_id : Disml.Snowflake.t option;
last_pin_timestamp : string option;
category_id : Disml.Snowflake.t option;
guild_id : Disml.Snowflake.t option;
name : string;
position : int;
topic : string option;
nsfw : bool;
slow_mode_timeout : int option;
}
val guild_text_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> guild_text
val sexp_of_guild_text : guild_text -> Ppx_sexp_conv_lib.Sexp.t
val guild_text_to_yojson : guild_text -> Yojson.Safe.json
val guild_text_of_yojson : Yojson.Safe.json -> guild_text Ppx_deriving_yojson_runtime.error_or
val _ : guild_text -> Yojson.Safe.json
val _ : Yojson.Safe.json -> guild_text Ppx_deriving_yojson_runtime.error_or
val guild_text_of_yojson_exn : Yojson.Safe.json -> guild_text
val _ : Yojson.Safe.json -> guild_text
type guild_voice = {
id : Disml.Snowflake.t;
category_id : Disml.Snowflake.t option;
guild_id : Disml.Snowflake.t option;
name : string;
position : int;
user_limit : int;
bitrate : int option;
}
val guild_voice_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> guild_voice
val sexp_of_guild_voice : guild_voice -> Ppx_sexp_conv_lib.Sexp.t
val guild_voice_to_yojson : guild_voice -> Yojson.Safe.json
val guild_voice_of_yojson : Yojson.Safe.json -> guild_voice Ppx_deriving_yojson_runtime.error_or
val _ : guild_voice -> Yojson.Safe.json
val _ : Yojson.Safe.json -> guild_voice Ppx_deriving_yojson_runtime.error_or
val guild_voice_of_yojson_exn : Yojson.Safe.json -> guild_voice
val _ : Yojson.Safe.json -> guild_voice
type category = {
id : Disml.Snowflake.t;
guild_id : Disml.Snowflake.t option;
position : int;
name : string;
}
val category_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> category
val sexp_of_category : category -> Ppx_sexp_conv_lib.Sexp.t
val category_to_yojson : category -> Yojson.Safe.json
val category_of_yojson : Yojson.Safe.json -> category Ppx_deriving_yojson_runtime.error_or
val _ : category -> Yojson.Safe.json
val _ : Yojson.Safe.json -> category Ppx_deriving_yojson_runtime.error_or
val category_of_yojson_exn : Yojson.Safe.json -> category
val _ : Yojson.Safe.json -> category
type t =
| Group of group
| Private of dm
| GuildText of guild_text
| GuildVoice of guild_voice
| Category of category
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
type channel_wrapper = {
id : Disml.Snowflake.t;
kind : int;
guild_id : Disml.Snowflake.t option;
position : int option;
name : string option;
topic : string option;
nsfw : bool option;
last_message_id : Disml.Snowflake.t option;
bitrate : int option;
user_limit : int option;
slow_mode_timeout : int option;
recipients : Disml.User_t.t list option;
icon : string option;
owner_id : Disml.Snowflake.t option;
application_id : Disml.Snowflake.t option;
category_id : Disml.Snowflake.t option;
last_pin_timestamp : string option;
}
val channel_wrapper_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> channel_wrapper
val sexp_of_channel_wrapper : channel_wrapper -> Ppx_sexp_conv_lib.Sexp.t
val channel_wrapper_to_yojson : channel_wrapper -> Yojson.Safe.json
val channel_wrapper_of_yojson : Yojson.Safe.json -> channel_wrapper Ppx_deriving_yojson_runtime.error_or
val _ : channel_wrapper -> Yojson.Safe.json
val _ : Yojson.Safe.json -> channel_wrapper Ppx_deriving_yojson_runtime.error_or
val channel_wrapper_of_yojson_exn : Yojson.Safe.json -> channel_wrapper
val _ : Yojson.Safe.json -> channel_wrapper
val unwrap_as_guild_text : channel_wrapper -> guild_text
val unwrap_as_guild_voice : channel_wrapper -> guild_voice
val unwrap_as_dm : channel_wrapper -> dm
val unwrap_as_group : channel_wrapper -> group
val unwrap_as_category : channel_wrapper -> category
val wrap : channel_wrapper -> t
val get_id : t -> Disml.Snowflake.t
val say : content:string -> t -> Disml.Message_t.t Async.Deferred.Or_error.t
val send_message : ?⁠embed:Yojson.Safe.json -> ?⁠content:string -> ?⁠file:string -> ?⁠tts:bool -> t -> Disml.Message_t.t Async.Deferred.Or_error.t
val delete : t -> unit Async.Deferred.Or_error.t
val get_message : id:Disml.Snowflake.t -> t -> Disml.Message_t.t Async.Deferred.Or_error.t
val get_messages : ?⁠mode:[ `Before | `After | `Around ] -> ?⁠id:Disml.Snowflake.t -> ?⁠limit:int -> t -> Disml.Message_t.t list Async.Deferred.Or_error.t
val broadcast_typing : t -> unit Async.Deferred.Or_error.t
val get_pins : t -> Disml.Message_t.t list Async.Deferred.Or_error.t
\ No newline at end of file +Disml__Channel (disml.Disml__Channel)

Module Disml__Channel

include module type of Disml.Channel_t
exception Invalid_channel of Yojson.Safe.json
type group = {
id : Disml.Snowflake.t;
last_message_id : Disml.Snowflake.t option;
last_pin_timestamp : string option;
icon : string option;
name : string option;
owner_id : Disml.Snowflake.t;
recipients : Disml.User_t.t list;
}
val group_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> group
val sexp_of_group : group -> Ppx_sexp_conv_lib.Sexp.t
val group_to_yojson : group -> Yojson.Safe.json
val group_of_yojson : Yojson.Safe.json -> group Ppx_deriving_yojson_runtime.error_or
val group_of_yojson_exn : Yojson.Safe.json -> group
type dm = {
id : Disml.Snowflake.t;
last_message_id : Disml.Snowflake.t option;
last_pin_timestamp : string option;
}
val dm_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> dm
val sexp_of_dm : dm -> Ppx_sexp_conv_lib.Sexp.t
val dm_to_yojson : dm -> Yojson.Safe.json
val dm_of_yojson : Yojson.Safe.json -> dm Ppx_deriving_yojson_runtime.error_or
val dm_of_yojson_exn : Yojson.Safe.json -> dm
type guild_text = {
id : Disml.Snowflake.t;
last_message_id : Disml.Snowflake.t option;
last_pin_timestamp : string option;
category_id : Disml.Snowflake.t option;
guild_id : Disml.Snowflake.t option;
name : string;
position : int;
topic : string option;
nsfw : bool;
slow_mode_timeout : int option;
}
val guild_text_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> guild_text
val sexp_of_guild_text : guild_text -> Ppx_sexp_conv_lib.Sexp.t
val guild_text_to_yojson : guild_text -> Yojson.Safe.json
val guild_text_of_yojson : Yojson.Safe.json -> guild_text Ppx_deriving_yojson_runtime.error_or
val guild_text_of_yojson_exn : Yojson.Safe.json -> guild_text
type guild_voice = {
id : Disml.Snowflake.t;
category_id : Disml.Snowflake.t option;
guild_id : Disml.Snowflake.t option;
name : string;
position : int;
user_limit : int;
bitrate : int option;
}
val guild_voice_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> guild_voice
val sexp_of_guild_voice : guild_voice -> Ppx_sexp_conv_lib.Sexp.t
val guild_voice_to_yojson : guild_voice -> Yojson.Safe.json
val guild_voice_of_yojson : Yojson.Safe.json -> guild_voice Ppx_deriving_yojson_runtime.error_or
val guild_voice_of_yojson_exn : Yojson.Safe.json -> guild_voice
type category = {
id : Disml.Snowflake.t;
guild_id : Disml.Snowflake.t option;
position : int;
name : string;
}
val category_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> category
val sexp_of_category : category -> Ppx_sexp_conv_lib.Sexp.t
val category_to_yojson : category -> Yojson.Safe.json
val category_of_yojson : Yojson.Safe.json -> category Ppx_deriving_yojson_runtime.error_or
val category_of_yojson_exn : Yojson.Safe.json -> category
type t =
| Group of group
| Private of dm
| GuildText of guild_text
| GuildVoice of guild_voice
| Category of category
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
type channel_wrapper = {
id : Disml.Snowflake.t;
kind : int;
guild_id : Disml.Snowflake.t option;
position : int option;
name : string option;
topic : string option;
nsfw : bool option;
last_message_id : Disml.Snowflake.t option;
bitrate : int option;
user_limit : int option;
slow_mode_timeout : int option;
recipients : Disml.User_t.t list option;
icon : string option;
owner_id : Disml.Snowflake.t option;
application_id : Disml.Snowflake.t option;
category_id : Disml.Snowflake.t option;
last_pin_timestamp : string option;
}
val channel_wrapper_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> channel_wrapper
val sexp_of_channel_wrapper : channel_wrapper -> Ppx_sexp_conv_lib.Sexp.t
val channel_wrapper_to_yojson : channel_wrapper -> Yojson.Safe.json
val channel_wrapper_of_yojson : Yojson.Safe.json -> channel_wrapper Ppx_deriving_yojson_runtime.error_or
val channel_wrapper_of_yojson_exn : Yojson.Safe.json -> channel_wrapper
val unwrap_as_guild_text : channel_wrapper -> guild_text
val unwrap_as_guild_voice : channel_wrapper -> guild_voice
val unwrap_as_dm : channel_wrapper -> dm
val unwrap_as_group : channel_wrapper -> group
val unwrap_as_category : channel_wrapper -> category
val wrap : channel_wrapper -> t
val get_id : t -> Disml.Snowflake.t
exception Invalid_message
exception No_message_found
val say : content:string -> t -> Disml.Message_t.t Async.Deferred.Or_error.t

Simple version of send_message that only takes ~content

val send_message : ?⁠embed:Disml.Embed.t -> ?⁠content:string -> ?⁠file:string -> ?⁠tts:bool -> t -> Disml.Message_t.t Async.Deferred.Or_error.t

Advanced message sending.

Raises Channel.Invalid_message if one of content or embed is not set.

Examples

open Core
+open Disml
+
+let check_command (msg : Message.t) =
+    if String.is_prefix ~prefix:"!hello" msg.content then
+        let embed = { Embed.default with title = Some "Hello World!" } in
+        Channel.send_message ~embed msg.channel >>> ignore
+
+Client.message_create := check_command
val delete : t -> unit Async.Deferred.Or_error.t
val get_message : id:Disml.Snowflake.t -> t -> Disml.Message_t.t Async.Deferred.Or_error.t
val get_messages : ?⁠mode:[ `Before | `After | `Around ] -> ?⁠id:Disml.Snowflake.t -> ?⁠limit:int -> t -> Disml.Message_t.t list Async.Deferred.Or_error.t
val broadcast_typing : t -> unit Async.Deferred.Or_error.t
val get_pins : t -> Disml.Message_t.t list Async.Deferred.Or_error.t
\ No newline at end of file diff --git a/docs/disml/Disml__Channel_t/index.html b/docs/disml/Disml__Channel_t/index.html index a3199ac..5bf4191 100644 --- a/docs/disml/Disml__Channel_t/index.html +++ b/docs/disml/Disml__Channel_t/index.html @@ -1,2 +1,2 @@ -Disml__Channel_t (disml.Disml__Channel_t)

Module Disml__Channel_t

exception Invalid_channel of Yojson.Safe.json
type group = {
id : Disml.Snowflake.t;
last_message_id : Disml.Snowflake.t option;
last_pin_timestamp : string option;
icon : string option;
name : string option;
owner_id : Disml.Snowflake.t;
recipients : Disml.User_t.t list;
}
val group_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> group
val sexp_of_group : group -> Ppx_sexp_conv_lib.Sexp.t
val group_to_yojson : group -> Yojson.Safe.json
val group_of_yojson : Yojson.Safe.json -> group Ppx_deriving_yojson_runtime.error_or
val _ : group -> Yojson.Safe.json
val _ : Yojson.Safe.json -> group Ppx_deriving_yojson_runtime.error_or
val group_of_yojson_exn : Yojson.Safe.json -> group
val _ : Yojson.Safe.json -> group
type dm = {
id : Disml.Snowflake.t;
last_message_id : Disml.Snowflake.t option;
last_pin_timestamp : string option;
}
val dm_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> dm
val sexp_of_dm : dm -> Ppx_sexp_conv_lib.Sexp.t
val dm_to_yojson : dm -> Yojson.Safe.json
val dm_of_yojson : Yojson.Safe.json -> dm Ppx_deriving_yojson_runtime.error_or
val _ : dm -> Yojson.Safe.json
val _ : Yojson.Safe.json -> dm Ppx_deriving_yojson_runtime.error_or
val dm_of_yojson_exn : Yojson.Safe.json -> dm
val _ : Yojson.Safe.json -> dm
type guild_text = {
id : Disml.Snowflake.t;
last_message_id : Disml.Snowflake.t option;
last_pin_timestamp : string option;
category_id : Disml.Snowflake.t option;
guild_id : Disml.Snowflake.t option;
name : string;
position : int;
topic : string option;
nsfw : bool;
slow_mode_timeout : int option;
}
val guild_text_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> guild_text
val sexp_of_guild_text : guild_text -> Ppx_sexp_conv_lib.Sexp.t
val guild_text_to_yojson : guild_text -> Yojson.Safe.json
val guild_text_of_yojson : Yojson.Safe.json -> guild_text Ppx_deriving_yojson_runtime.error_or
val _ : guild_text -> Yojson.Safe.json
val _ : Yojson.Safe.json -> guild_text Ppx_deriving_yojson_runtime.error_or
val guild_text_of_yojson_exn : Yojson.Safe.json -> guild_text
val _ : Yojson.Safe.json -> guild_text
type guild_voice = {
id : Disml.Snowflake.t;
category_id : Disml.Snowflake.t option;
guild_id : Disml.Snowflake.t option;
name : string;
position : int;
user_limit : int;
bitrate : int option;
}
val guild_voice_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> guild_voice
val sexp_of_guild_voice : guild_voice -> Ppx_sexp_conv_lib.Sexp.t
val guild_voice_to_yojson : guild_voice -> Yojson.Safe.json
val guild_voice_of_yojson : Yojson.Safe.json -> guild_voice Ppx_deriving_yojson_runtime.error_or
val _ : guild_voice -> Yojson.Safe.json
val _ : Yojson.Safe.json -> guild_voice Ppx_deriving_yojson_runtime.error_or
val guild_voice_of_yojson_exn : Yojson.Safe.json -> guild_voice
val _ : Yojson.Safe.json -> guild_voice
type category = {
id : Disml.Snowflake.t;
guild_id : Disml.Snowflake.t option;
position : int;
name : string;
}
val category_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> category
val sexp_of_category : category -> Ppx_sexp_conv_lib.Sexp.t
val category_to_yojson : category -> Yojson.Safe.json
val category_of_yojson : Yojson.Safe.json -> category Ppx_deriving_yojson_runtime.error_or
val _ : category -> Yojson.Safe.json
val _ : Yojson.Safe.json -> category Ppx_deriving_yojson_runtime.error_or
val category_of_yojson_exn : Yojson.Safe.json -> category
val _ : Yojson.Safe.json -> category
type t =
| Group of group
| Private of dm
| GuildText of guild_text
| GuildVoice of guild_voice
| Category of category
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
type channel_wrapper = {
id : Disml.Snowflake.t;
kind : int;
guild_id : Disml.Snowflake.t option;
position : int option;
name : string option;
topic : string option;
nsfw : bool option;
last_message_id : Disml.Snowflake.t option;
bitrate : int option;
user_limit : int option;
slow_mode_timeout : int option;
recipients : Disml.User_t.t list option;
icon : string option;
owner_id : Disml.Snowflake.t option;
application_id : Disml.Snowflake.t option;
category_id : Disml.Snowflake.t option;
last_pin_timestamp : string option;
}
val channel_wrapper_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> channel_wrapper
val sexp_of_channel_wrapper : channel_wrapper -> Ppx_sexp_conv_lib.Sexp.t
val channel_wrapper_to_yojson : channel_wrapper -> Yojson.Safe.json
val channel_wrapper_of_yojson : Yojson.Safe.json -> channel_wrapper Ppx_deriving_yojson_runtime.error_or
val _ : channel_wrapper -> Yojson.Safe.json
val _ : Yojson.Safe.json -> channel_wrapper Ppx_deriving_yojson_runtime.error_or
val channel_wrapper_of_yojson_exn : Yojson.Safe.json -> channel_wrapper
val _ : Yojson.Safe.json -> channel_wrapper
val unwrap_as_guild_text : channel_wrapper -> guild_text
val unwrap_as_guild_voice : channel_wrapper -> guild_voice
val unwrap_as_dm : channel_wrapper -> dm
val unwrap_as_group : channel_wrapper -> group
val unwrap_as_category : channel_wrapper -> category
val wrap : channel_wrapper -> t
val get_id : t -> Disml.Snowflake.t
\ No newline at end of file +Disml__Channel_t (disml.Disml__Channel_t)

Module Disml__Channel_t

exception Invalid_channel of Yojson.Safe.json
type group = {
id : Disml.Snowflake.t;
last_message_id : Disml.Snowflake.t option;
last_pin_timestamp : string option;
icon : string option;
name : string option;
owner_id : Disml.Snowflake.t;
recipients : Disml.User_t.t list;
}
val group_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> group
val sexp_of_group : group -> Ppx_sexp_conv_lib.Sexp.t
val group_to_yojson : group -> Yojson.Safe.json
val group_of_yojson : Yojson.Safe.json -> group Ppx_deriving_yojson_runtime.error_or
val group_of_yojson_exn : Yojson.Safe.json -> group
type dm = {
id : Disml.Snowflake.t;
last_message_id : Disml.Snowflake.t option;
last_pin_timestamp : string option;
}
val dm_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> dm
val sexp_of_dm : dm -> Ppx_sexp_conv_lib.Sexp.t
val dm_to_yojson : dm -> Yojson.Safe.json
val dm_of_yojson : Yojson.Safe.json -> dm Ppx_deriving_yojson_runtime.error_or
val dm_of_yojson_exn : Yojson.Safe.json -> dm
type guild_text = {
id : Disml.Snowflake.t;
last_message_id : Disml.Snowflake.t option;
last_pin_timestamp : string option;
category_id : Disml.Snowflake.t option;
guild_id : Disml.Snowflake.t option;
name : string;
position : int;
topic : string option;
nsfw : bool;
slow_mode_timeout : int option;
}
val guild_text_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> guild_text
val sexp_of_guild_text : guild_text -> Ppx_sexp_conv_lib.Sexp.t
val guild_text_to_yojson : guild_text -> Yojson.Safe.json
val guild_text_of_yojson : Yojson.Safe.json -> guild_text Ppx_deriving_yojson_runtime.error_or
val guild_text_of_yojson_exn : Yojson.Safe.json -> guild_text
type guild_voice = {
id : Disml.Snowflake.t;
category_id : Disml.Snowflake.t option;
guild_id : Disml.Snowflake.t option;
name : string;
position : int;
user_limit : int;
bitrate : int option;
}
val guild_voice_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> guild_voice
val sexp_of_guild_voice : guild_voice -> Ppx_sexp_conv_lib.Sexp.t
val guild_voice_to_yojson : guild_voice -> Yojson.Safe.json
val guild_voice_of_yojson : Yojson.Safe.json -> guild_voice Ppx_deriving_yojson_runtime.error_or
val guild_voice_of_yojson_exn : Yojson.Safe.json -> guild_voice
type category = {
id : Disml.Snowflake.t;
guild_id : Disml.Snowflake.t option;
position : int;
name : string;
}
val category_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> category
val sexp_of_category : category -> Ppx_sexp_conv_lib.Sexp.t
val category_to_yojson : category -> Yojson.Safe.json
val category_of_yojson : Yojson.Safe.json -> category Ppx_deriving_yojson_runtime.error_or
val category_of_yojson_exn : Yojson.Safe.json -> category
type t =
| Group of group
| Private of dm
| GuildText of guild_text
| GuildVoice of guild_voice
| Category of category
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
type channel_wrapper = {
id : Disml.Snowflake.t;
kind : int;
guild_id : Disml.Snowflake.t option;
position : int option;
name : string option;
topic : string option;
nsfw : bool option;
last_message_id : Disml.Snowflake.t option;
bitrate : int option;
user_limit : int option;
slow_mode_timeout : int option;
recipients : Disml.User_t.t list option;
icon : string option;
owner_id : Disml.Snowflake.t option;
application_id : Disml.Snowflake.t option;
category_id : Disml.Snowflake.t option;
last_pin_timestamp : string option;
}
val channel_wrapper_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> channel_wrapper
val sexp_of_channel_wrapper : channel_wrapper -> Ppx_sexp_conv_lib.Sexp.t
val channel_wrapper_to_yojson : channel_wrapper -> Yojson.Safe.json
val channel_wrapper_of_yojson : Yojson.Safe.json -> channel_wrapper Ppx_deriving_yojson_runtime.error_or
val channel_wrapper_of_yojson_exn : Yojson.Safe.json -> channel_wrapper
val unwrap_as_guild_text : channel_wrapper -> guild_text
val unwrap_as_guild_voice : channel_wrapper -> guild_voice
val unwrap_as_dm : channel_wrapper -> dm
val unwrap_as_group : channel_wrapper -> group
val unwrap_as_category : channel_wrapper -> category
val wrap : channel_wrapper -> t
val get_id : t -> Disml.Snowflake.t
\ No newline at end of file diff --git a/docs/disml/Disml__Client/index.html b/docs/disml/Disml__Client/index.html index c5b95af..b959c75 100644 --- a/docs/disml/Disml__Client/index.html +++ b/docs/disml/Disml__Client/index.html @@ -1,2 +1,17 @@ -Disml__Client (disml.Disml__Client)

Module Disml__Client

include Disml.Client_options
val token : string Stdlib.ref
include Disml.Dispatch
val hello : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when connecting to the gateway, most users will have no use for this.

val ready : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when each shard receives READY from discord after identifying on the gateway. Other event dispatch is received after this.

val resumed : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when successfully reconnecting to the gateway.

val invalid_session : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when Discord decides a session is invalid, much like Client.hello this is not very useful for most people.

val channel_create : (Disml.Channel_t.t -> unit) Stdlib.ref

Dispatched when a channel is created which is visible to the bot.

val channel_update : (Disml.Channel_t.t -> unit) Stdlib.ref

Dispatched when a channel visible to the bot is changed.

val channel_delete : (Disml.Channel_t.t -> unit) Stdlib.ref

Dispatched when a channel visible to the bot is deleted.

val channel_pins_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when messages are pinned or unpinned from a a channel.

val guild_create : (Disml.Guild_t.t -> unit) Stdlib.ref

Dispatched when the bot joins a guild, and during startup.

val guild_update : (Disml.Guild_t.t -> unit) Stdlib.ref

Dispatched when a guild the bot is in is edited.

val guild_delete : (Disml.Guild_t.t -> unit) Stdlib.ref

Dispatched when the bot is removed from a guild.

val member_ban : (Disml.Ban_t.t -> unit) Stdlib.ref

Dispatched when a member is banned.

val member_unban : (Disml.Ban_t.t -> unit) Stdlib.ref

Dispatched when a member is unbanned.

val guild_emojis_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when emojis are added or removed from a guild.

val integrations_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when a guild's integrations are updated.

val member_join : (Disml.Member_t.t -> unit) Stdlib.ref

Dispatched when a member joins a guild.

val member_leave : (Disml.Member_t.member_wrapper -> unit) Stdlib.ref

Dispatched when a member leaves a guild. Is Dispatched alongside Client.member_ban when a user is banned.

val member_update : (Disml.Member_t.member_update -> unit) Stdlib.ref

Dispatched when a member object is updated.

val members_chunk : (Disml.Member_t.t list -> unit) Stdlib.ref

Dispatched when requesting guild members through Client.request_guild_members

val role_create : (Disml.Role_t.t -> unit) Stdlib.ref

Dispatched when a role is created.

val role_update : (Disml.Role_t.t -> unit) Stdlib.ref

Dispatched when a role is edited.

val role_delete : (Disml.Role_t.t -> unit) Stdlib.ref

Dispatched when a role is deleted.

val message_create : (Disml.Message_t.t -> unit) Stdlib.ref

Dispatched when a message is sent.

val message_update : (Disml.Message_t.message_update -> unit) Stdlib.ref

Dispatched when a message is edited. This does not necessarily mean the content changed.

val message_delete : (Disml.Snowflake.t -> Disml.Snowflake.t -> unit) Stdlib.ref

Dispatched when a message is deleted.

val message_bulk_delete : (Disml.Snowflake.t list -> unit) Stdlib.ref

Dispatched when messages are bulk deleted.

val reaction_add : (Disml.Reaction_t.reaction_event -> unit) Stdlib.ref

Dispatched when a rection is added to a message.

val reaction_remove : (Disml.Reaction_t.reaction_event -> unit) Stdlib.ref

Dispatched when a reaction is removed from a message.

val reaction_bulk_remove : (Disml.Reaction_t.t list -> unit) Stdlib.ref

Dispatched when all reactions are cleared from a message.

val presence_update : (Disml.Presence.t -> unit) Stdlib.ref

Dispatched when a user updates their presence.

val typing_start : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when a typing indicator is displayed.

val user_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when the current user is updated. You most likely want Client.member_update or Client.presence_update instead.

type t = {
sharder : Disml.Sharder.t;
token : string;
}
val start : ?⁠count:int -> string -> t Async_kernel__Deferred.t
val set_status : status:Yojson.Safe.json -> t -> Disml.Sharder.Shard.shard list Async.Deferred.t
val set_status_with : f:(Disml.Sharder.Shard.shard -> Yojson.Safe.json) -> t -> Disml.Sharder.Shard.shard list Async.Deferred.t
val request_guild_members : guild:Disml.Snowflake.t -> ?⁠query:string -> ?⁠limit:int -> t -> Disml.Sharder.Shard.shard list Async.Deferred.t
\ No newline at end of file +Disml__Client (disml.Disml__Client)

Module Disml__Client

include module type of Disml.Client_options
val token : string Stdlib.ref

Token that is set when using Client.start

include module type of Disml.Dispatch

Examples

Client.ready := (fun _ -> print_endline "Shard is Ready!")

Client.guild_create := (fun guild -> print_endline guild.name)

open Core
+open Disml
+
+let check_command (msg : Message.t) =
+    if String.is_prefix ~prefix:"!ping" msg.content then
+        Message.reply msg "Pong!" >>> ignore
+
+Client.message_create := check_command
val hello : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when connecting to the gateway, most users will have no use for this.

val ready : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when each shard receives READY from discord after identifying on the gateway. Other event dispatch is received after this.

val resumed : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when successfully reconnecting to the gateway.

val invalid_session : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when Discord decides a session is invalid, much like Client.hello this is not very useful for most people.

val channel_create : (Disml.Channel_t.t -> unit) Stdlib.ref

Dispatched when a channel is created which is visible to the bot.

val channel_update : (Disml.Channel_t.t -> unit) Stdlib.ref

Dispatched when a channel visible to the bot is changed.

val channel_delete : (Disml.Channel_t.t -> unit) Stdlib.ref

Dispatched when a channel visible to the bot is deleted.

val channel_pins_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when messages are pinned or unpinned from a a channel.

val guild_create : (Disml.Guild_t.t -> unit) Stdlib.ref

Dispatched when the bot joins a guild, and during startup.

val guild_update : (Disml.Guild_t.t -> unit) Stdlib.ref

Dispatched when a guild the bot is in is edited.

val guild_delete : (Disml.Guild_t.t -> unit) Stdlib.ref

Dispatched when the bot is removed from a guild.

val member_ban : (Disml.Ban_t.t -> unit) Stdlib.ref

Dispatched when a member is banned.

val member_unban : (Disml.Ban_t.t -> unit) Stdlib.ref

Dispatched when a member is unbanned.

val guild_emojis_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when emojis are added or removed from a guild.

val integrations_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when a guild's integrations are updated.

val member_join : (Disml.Member_t.t -> unit) Stdlib.ref

Dispatched when a member joins a guild.

val member_leave : (Disml.Member_t.member_wrapper -> unit) Stdlib.ref

Dispatched when a member leaves a guild. Is Dispatched alongside Client.member_ban when a user is banned.

val member_update : (Disml.Member_t.member_update -> unit) Stdlib.ref

Dispatched when a member object is updated.

val members_chunk : (Disml.Member_t.t list -> unit) Stdlib.ref

Dispatched when requesting guild members through Client.request_guild_members

val role_create : (Disml.Role_t.t -> unit) Stdlib.ref

Dispatched when a role is created.

val role_update : (Disml.Role_t.t -> unit) Stdlib.ref

Dispatched when a role is edited.

val role_delete : (Disml.Role_t.t -> unit) Stdlib.ref

Dispatched when a role is deleted.

val message_create : (Disml.Message_t.t -> unit) Stdlib.ref

Dispatched when a message is sent.

val message_update : (Disml.Message_t.message_update -> unit) Stdlib.ref

Dispatched when a message is edited. This does not necessarily mean the content changed.

val message_delete : (Disml.Snowflake.t -> Disml.Snowflake.t -> unit) Stdlib.ref

Dispatched when a message is deleted.

val message_bulk_delete : (Disml.Snowflake.t list -> unit) Stdlib.ref

Dispatched when messages are bulk deleted.

val reaction_add : (Disml.Reaction_t.reaction_event -> unit) Stdlib.ref

Dispatched when a rection is added to a message.

val reaction_remove : (Disml.Reaction_t.reaction_event -> unit) Stdlib.ref

Dispatched when a reaction is removed from a message.

val reaction_bulk_remove : (Disml.Reaction_t.t list -> unit) Stdlib.ref

Dispatched when all reactions are cleared from a message.

val presence_update : (Disml.Presence.t -> unit) Stdlib.ref

Dispatched when a user updates their presence.

val typing_start : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when a typing indicator is displayed.

val user_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when the current user is updated. You most likely want Client.member_update or Client.presence_update instead.

type t = {
sharder : Disml.Sharder.t;
}

Type of the Client, it isn't recommended to access the fields directly.

val start : ?⁠count:int -> string -> t Async.Deferred.t

Start the Client. This begins shard connections to Discord and event handlers should be registered prior to calling this.

Example

open Async
+open Disml
+
+let main () =
+    let token = "a valid bot token" in
+    Client.start ~count:5 token >>> print_endline "Client launched"
+
+let _ =
+    Scheduler.go_main ~main ()
parameter ?count

Optional amount of shards to launch. Defaults to autosharding

parameter string

The token used for authentication

returns

A deferred client object

val set_status : status:Yojson.Safe.json -> t -> Disml.Sharder.Shard.shard list Async.Deferred.t

Same as Sharder.set_status where client.sharder is passed.

val set_status_with : f:(Disml.Sharder.Shard.shard -> Yojson.Safe.json) -> t -> Disml.Sharder.Shard.shard list Async.Deferred.t

Same as Sharder.set_status_with where client.sharder is passed.

val request_guild_members : guild:Disml.Snowflake.t -> ?⁠query:string -> ?⁠limit:int -> t -> Disml.Sharder.Shard.shard list Async.Deferred.t

Same as Sharder.request_guild_members where client.sharder is passed.

\ No newline at end of file diff --git a/docs/disml/Disml__Client_options/index.html b/docs/disml/Disml__Client_options/index.html index 7bcd9fc..9fd0520 100644 --- a/docs/disml/Disml__Client_options/index.html +++ b/docs/disml/Disml__Client_options/index.html @@ -1,2 +1,2 @@ -Disml__Client_options (disml.Disml__Client_options)

Module Disml__Client_options

val token : string Stdlib.ref
\ No newline at end of file +Disml__Client_options (disml.Disml__Client_options)

Module Disml__Client_options

val token : string Stdlib.ref

Token that is set when using Client.start

\ No newline at end of file diff --git a/docs/disml/Disml__Dispatch/index.html b/docs/disml/Disml__Dispatch/index.html index d928bdf..2b401ca 100644 --- a/docs/disml/Disml__Dispatch/index.html +++ b/docs/disml/Disml__Dispatch/index.html @@ -1,2 +1,9 @@ -Disml__Dispatch (disml.Disml__Dispatch)

Module Disml__Dispatch

val hello : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when connecting to the gateway, most users will have no use for this.

val ready : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when each shard receives READY from discord after identifying on the gateway. Other event dispatch is received after this.

val resumed : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when successfully reconnecting to the gateway.

val invalid_session : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when Discord decides a session is invalid, much like Client.hello this is not very useful for most people.

val channel_create : (Disml.Channel_t.t -> unit) Stdlib.ref

Dispatched when a channel is created which is visible to the bot.

val channel_update : (Disml.Channel_t.t -> unit) Stdlib.ref

Dispatched when a channel visible to the bot is changed.

val channel_delete : (Disml.Channel_t.t -> unit) Stdlib.ref

Dispatched when a channel visible to the bot is deleted.

val channel_pins_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when messages are pinned or unpinned from a a channel.

val guild_create : (Disml.Guild_t.t -> unit) Stdlib.ref

Dispatched when the bot joins a guild, and during startup.

val guild_update : (Disml.Guild_t.t -> unit) Stdlib.ref

Dispatched when a guild the bot is in is edited.

val guild_delete : (Disml.Guild_t.t -> unit) Stdlib.ref

Dispatched when the bot is removed from a guild.

val member_ban : (Disml.Ban_t.t -> unit) Stdlib.ref

Dispatched when a member is banned.

val member_unban : (Disml.Ban_t.t -> unit) Stdlib.ref

Dispatched when a member is unbanned.

val guild_emojis_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when emojis are added or removed from a guild.

val integrations_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when a guild's integrations are updated.

val member_join : (Disml.Member_t.t -> unit) Stdlib.ref

Dispatched when a member joins a guild.

val member_leave : (Disml.Member_t.member_wrapper -> unit) Stdlib.ref

Dispatched when a member leaves a guild. Is Dispatched alongside Client.member_ban when a user is banned.

val member_update : (Disml.Member_t.member_update -> unit) Stdlib.ref

Dispatched when a member object is updated.

val members_chunk : (Disml.Member_t.t list -> unit) Stdlib.ref

Dispatched when requesting guild members through Client.request_guild_members

val role_create : (Disml.Role_t.t -> unit) Stdlib.ref

Dispatched when a role is created.

val role_update : (Disml.Role_t.t -> unit) Stdlib.ref

Dispatched when a role is edited.

val role_delete : (Disml.Role_t.t -> unit) Stdlib.ref

Dispatched when a role is deleted.

val message_create : (Disml.Message_t.t -> unit) Stdlib.ref

Dispatched when a message is sent.

val message_update : (Disml.Message_t.message_update -> unit) Stdlib.ref

Dispatched when a message is edited. This does not necessarily mean the content changed.

val message_delete : (Disml.Snowflake.t -> Disml.Snowflake.t -> unit) Stdlib.ref

Dispatched when a message is deleted.

val message_bulk_delete : (Disml.Snowflake.t list -> unit) Stdlib.ref

Dispatched when messages are bulk deleted.

val reaction_add : (Disml.Reaction_t.reaction_event -> unit) Stdlib.ref

Dispatched when a rection is added to a message.

val reaction_remove : (Disml.Reaction_t.reaction_event -> unit) Stdlib.ref

Dispatched when a reaction is removed from a message.

val reaction_bulk_remove : (Disml.Reaction_t.t list -> unit) Stdlib.ref

Dispatched when all reactions are cleared from a message.

val presence_update : (Disml.Presence.t -> unit) Stdlib.ref

Dispatched when a user updates their presence.

val typing_start : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when a typing indicator is displayed.

val user_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when the current user is updated. You most likely want Client.member_update or Client.presence_update instead.

\ No newline at end of file +Disml__Dispatch (disml.Disml__Dispatch)

Module Disml__Dispatch

Used to store dispatch callbacks. Each event can only have one callback registered at a time. These should be accessed through their re-export in Client.

Examples

Client.ready := (fun _ -> print_endline "Shard is Ready!")

Client.guild_create := (fun guild -> print_endline guild.name)

open Core
+open Disml
+
+let check_command (msg : Message.t) =
+    if String.is_prefix ~prefix:"!ping" msg.content then
+        Message.reply msg "Pong!" >>> ignore
+
+Client.message_create := check_command
val hello : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when connecting to the gateway, most users will have no use for this.

val ready : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when each shard receives READY from discord after identifying on the gateway. Other event dispatch is received after this.

val resumed : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when successfully reconnecting to the gateway.

val invalid_session : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when Discord decides a session is invalid, much like Client.hello this is not very useful for most people.

val channel_create : (Disml.Channel_t.t -> unit) Stdlib.ref

Dispatched when a channel is created which is visible to the bot.

val channel_update : (Disml.Channel_t.t -> unit) Stdlib.ref

Dispatched when a channel visible to the bot is changed.

val channel_delete : (Disml.Channel_t.t -> unit) Stdlib.ref

Dispatched when a channel visible to the bot is deleted.

val channel_pins_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when messages are pinned or unpinned from a a channel.

val guild_create : (Disml.Guild_t.t -> unit) Stdlib.ref

Dispatched when the bot joins a guild, and during startup.

val guild_update : (Disml.Guild_t.t -> unit) Stdlib.ref

Dispatched when a guild the bot is in is edited.

val guild_delete : (Disml.Guild_t.t -> unit) Stdlib.ref

Dispatched when the bot is removed from a guild.

val member_ban : (Disml.Ban_t.t -> unit) Stdlib.ref

Dispatched when a member is banned.

val member_unban : (Disml.Ban_t.t -> unit) Stdlib.ref

Dispatched when a member is unbanned.

val guild_emojis_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when emojis are added or removed from a guild.

val integrations_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when a guild's integrations are updated.

val member_join : (Disml.Member_t.t -> unit) Stdlib.ref

Dispatched when a member joins a guild.

val member_leave : (Disml.Member_t.member_wrapper -> unit) Stdlib.ref

Dispatched when a member leaves a guild. Is Dispatched alongside Client.member_ban when a user is banned.

val member_update : (Disml.Member_t.member_update -> unit) Stdlib.ref

Dispatched when a member object is updated.

val members_chunk : (Disml.Member_t.t list -> unit) Stdlib.ref

Dispatched when requesting guild members through Client.request_guild_members

val role_create : (Disml.Role_t.t -> unit) Stdlib.ref

Dispatched when a role is created.

val role_update : (Disml.Role_t.t -> unit) Stdlib.ref

Dispatched when a role is edited.

val role_delete : (Disml.Role_t.t -> unit) Stdlib.ref

Dispatched when a role is deleted.

val message_create : (Disml.Message_t.t -> unit) Stdlib.ref

Dispatched when a message is sent.

val message_update : (Disml.Message_t.message_update -> unit) Stdlib.ref

Dispatched when a message is edited. This does not necessarily mean the content changed.

val message_delete : (Disml.Snowflake.t -> Disml.Snowflake.t -> unit) Stdlib.ref

Dispatched when a message is deleted.

val message_bulk_delete : (Disml.Snowflake.t list -> unit) Stdlib.ref

Dispatched when messages are bulk deleted.

val reaction_add : (Disml.Reaction_t.reaction_event -> unit) Stdlib.ref

Dispatched when a rection is added to a message.

val reaction_remove : (Disml.Reaction_t.reaction_event -> unit) Stdlib.ref

Dispatched when a reaction is removed from a message.

val reaction_bulk_remove : (Disml.Reaction_t.t list -> unit) Stdlib.ref

Dispatched when all reactions are cleared from a message.

val presence_update : (Disml.Presence.t -> unit) Stdlib.ref

Dispatched when a user updates their presence.

val typing_start : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when a typing indicator is displayed.

val user_update : (Yojson.Safe.json -> unit) Stdlib.ref

Dispatched when the current user is updated. You most likely want Client.member_update or Client.presence_update instead.

\ No newline at end of file diff --git a/docs/disml/Disml__Embed/index.html b/docs/disml/Disml__Embed/index.html index f62c780..9a515c7 100644 --- a/docs/disml/Disml__Embed/index.html +++ b/docs/disml/Disml__Embed/index.html @@ -1,2 +1,2 @@ -Disml__Embed (disml.Disml__Embed)

Module Disml__Embed

val _ : footer -> Yojson.Safe.json
val _ : Yojson.Safe.json -> footer Ppx_deriving_yojson_runtime.error_or
val _ : Yojson.Safe.json -> footer
type image = {
url : string option;
proxy_url : string option;
height : int option;
width : int option;
}
val image_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> image
val sexp_of_image : image -> Ppx_sexp_conv_lib.Sexp.t
val image_to_yojson : image -> Yojson.Safe.json
val image_of_yojson : Yojson.Safe.json -> image Ppx_deriving_yojson_runtime.error_or
val _ : image -> Yojson.Safe.json
val _ : Yojson.Safe.json -> image Ppx_deriving_yojson_runtime.error_or
val image_of_yojson_exn : Yojson.Safe.json -> image
val _ : Yojson.Safe.json -> image
type video = {
url : string option;
height : int option;
width : int option;
}
val video_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> video
val sexp_of_video : video -> Ppx_sexp_conv_lib.Sexp.t
val video_to_yojson : video -> Yojson.Safe.json
val video_of_yojson : Yojson.Safe.json -> video Ppx_deriving_yojson_runtime.error_or
val _ : video -> Yojson.Safe.json
val _ : Yojson.Safe.json -> video Ppx_deriving_yojson_runtime.error_or
val video_of_yojson_exn : Yojson.Safe.json -> video
val _ : Yojson.Safe.json -> video
type provider = {
name : string option;
url : string option;
}
val provider_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> provider
val sexp_of_provider : provider -> Ppx_sexp_conv_lib.Sexp.t
val provider_to_yojson : provider -> Yojson.Safe.json
val provider_of_yojson : Yojson.Safe.json -> provider Ppx_deriving_yojson_runtime.error_or
val _ : provider -> Yojson.Safe.json
val _ : Yojson.Safe.json -> provider Ppx_deriving_yojson_runtime.error_or
val provider_of_yojson_exn : Yojson.Safe.json -> provider
val _ : Yojson.Safe.json -> provider
type author = {
name : string option;
url : string option;
icon_url : string option;
proxy_icon_url : string option;
}
val author_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> author
val sexp_of_author : author -> Ppx_sexp_conv_lib.Sexp.t
val author_to_yojson : author -> Yojson.Safe.json
val author_of_yojson : Yojson.Safe.json -> author Ppx_deriving_yojson_runtime.error_or
val _ : author -> Yojson.Safe.json
val _ : Yojson.Safe.json -> author Ppx_deriving_yojson_runtime.error_or
val author_of_yojson_exn : Yojson.Safe.json -> author
val _ : Yojson.Safe.json -> author
type field = {
name : string;
value : string;
inline : bool;
}
val field_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> field
val sexp_of_field : field -> Ppx_sexp_conv_lib.Sexp.t
val field_to_yojson : field -> Yojson.Safe.json
val field_of_yojson : Yojson.Safe.json -> field Ppx_deriving_yojson_runtime.error_or
val _ : field -> Yojson.Safe.json
val _ : Yojson.Safe.json -> field Ppx_deriving_yojson_runtime.error_or
val field_of_yojson_exn : Yojson.Safe.json -> field
val _ : Yojson.Safe.json -> field
type t = {
title : string option;
kind : string option;
description : string option;
url : string option;
timestamp : string option;
colour : int option;
footer : footer option;
image : image option;
thumbnail : image option;
video : video option;
provider : provider option;
author : author option;
fields : field list;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
\ No newline at end of file +Disml__Embed (disml.Disml__Embed)

Module Disml__Embed

type image = {
url : string option;
proxy_url : string option;
height : int option;
width : int option;
}
val image_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> image
val sexp_of_image : image -> Ppx_sexp_conv_lib.Sexp.t
val image_to_yojson : image -> Yojson.Safe.json
val image_of_yojson : Yojson.Safe.json -> image Ppx_deriving_yojson_runtime.error_or
val image_of_yojson_exn : Yojson.Safe.json -> image
type video = {
url : string option;
height : int option;
width : int option;
}
val video_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> video
val sexp_of_video : video -> Ppx_sexp_conv_lib.Sexp.t
val video_to_yojson : video -> Yojson.Safe.json
val video_of_yojson : Yojson.Safe.json -> video Ppx_deriving_yojson_runtime.error_or
val video_of_yojson_exn : Yojson.Safe.json -> video
type provider = {
name : string option;
url : string option;
}
val provider_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> provider
val sexp_of_provider : provider -> Ppx_sexp_conv_lib.Sexp.t
val provider_to_yojson : provider -> Yojson.Safe.json
val provider_of_yojson : Yojson.Safe.json -> provider Ppx_deriving_yojson_runtime.error_or
val provider_of_yojson_exn : Yojson.Safe.json -> provider
type author = {
name : string option;
url : string option;
icon_url : string option;
proxy_icon_url : string option;
}
val author_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> author
val sexp_of_author : author -> Ppx_sexp_conv_lib.Sexp.t
val author_to_yojson : author -> Yojson.Safe.json
val author_of_yojson : Yojson.Safe.json -> author Ppx_deriving_yojson_runtime.error_or
val author_of_yojson_exn : Yojson.Safe.json -> author
type field = {
name : string;
value : string;
inline : bool;
}
val field_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> field
val sexp_of_field : field -> Ppx_sexp_conv_lib.Sexp.t
val field_to_yojson : field -> Yojson.Safe.json
val field_of_yojson : Yojson.Safe.json -> field Ppx_deriving_yojson_runtime.error_or
val field_of_yojson_exn : Yojson.Safe.json -> field
type t = {
title : string option;
kind : string option;
description : string option;
url : string option;
timestamp : string option;
colour : int option;
footer : footer option;
image : image option;
thumbnail : image option;
video : video option;
provider : provider option;
author : author option;
fields : field list;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val default : t
val default_image : image
val default_video : video
val default_provider : provider
val default_author : author
val title : string -> t -> t
val description : string -> t -> t
val url : string -> t -> t
val timestamp : string -> t -> t
val colour : int -> t -> t
val color : int -> t -> t
val image : string -> t -> t
val thumbnail : string -> t -> t
val author : (author -> author) -> t -> t
val field : (string * string * bool) -> t -> t
val fields : (string * string * bool) list -> t -> t
val author_name : string -> author -> author
val author_url : string -> author -> author
val author_icon : string -> author -> author
\ No newline at end of file diff --git a/docs/disml/Disml__Emoji/index.html b/docs/disml/Disml__Emoji/index.html index f23c60a..9a766b9 100644 --- a/docs/disml/Disml__Emoji/index.html +++ b/docs/disml/Disml__Emoji/index.html @@ -1,2 +1,2 @@ -Disml__Emoji (disml.Disml__Emoji)

Module Disml__Emoji

type partial_emoji = {
id : Disml.Snowflake.t option;
name : string;
}
val partial_emoji_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> partial_emoji
val sexp_of_partial_emoji : partial_emoji -> Ppx_sexp_conv_lib.Sexp.t
val partial_emoji_to_yojson : partial_emoji -> Yojson.Safe.json
val partial_emoji_of_yojson : Yojson.Safe.json -> partial_emoji Ppx_deriving_yojson_runtime.error_or
val _ : partial_emoji -> Yojson.Safe.json
val _ : Yojson.Safe.json -> partial_emoji Ppx_deriving_yojson_runtime.error_or
val partial_emoji_of_yojson_exn : Yojson.Safe.json -> partial_emoji
val _ : Yojson.Safe.json -> partial_emoji
type t = {
id : Disml.Snowflake.t option;
name : string;
roles : Disml.Snowflake.t list;
user : Disml.User_t.t option;
require_colons : bool option;
managed : bool option;
animated : bool option;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
\ No newline at end of file +Disml__Emoji (disml.Disml__Emoji)

Module Disml__Emoji

type partial_emoji = {
id : Disml.Snowflake.t option;
name : string;
}
val partial_emoji_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> partial_emoji
val sexp_of_partial_emoji : partial_emoji -> Ppx_sexp_conv_lib.Sexp.t
val partial_emoji_to_yojson : partial_emoji -> Yojson.Safe.json
val partial_emoji_of_yojson : Yojson.Safe.json -> partial_emoji Ppx_deriving_yojson_runtime.error_or
val partial_emoji_of_yojson_exn : Yojson.Safe.json -> partial_emoji
type t = {
id : Disml.Snowflake.t option;
name : string;
roles : Disml.Snowflake.t list;
user : Disml.User_t.t option;
require_colons : bool option;
managed : bool option;
animated : bool option;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
\ No newline at end of file diff --git a/docs/disml/Disml__Endpoints/index.html b/docs/disml/Disml__Endpoints/index.html index 8917472..232b2c1 100644 --- a/docs/disml/Disml__Endpoints/index.html +++ b/docs/disml/Disml__Endpoints/index.html @@ -1,2 +1,2 @@ -Disml__Endpoints (disml.Disml__Endpoints)

Module Disml__Endpoints

val gateway : string
val gateway_bot : string
val channel : int -> string
val channel_messages : int -> string
val channel_message : int -> int -> string
val channel_reaction_me : int -> int -> string -> string
val channel_reaction : int -> int -> string -> int -> string
val channel_reactions_get : int -> int -> string -> string
val channel_reactions_delete : int -> int -> string
val channel_bulk_delete : int -> string
val channel_permission : int -> int -> string
val channel_permissions : int -> string
val channels : string
val channel_call_ring : int -> string
val channel_invites : int -> string
val channel_typing : int -> string
val channel_pins : int -> string
val channel_pin : int -> int -> string
val guilds : string
val guild : int -> string
val guild_channels : int -> string
val guild_members : int -> string
val guild_member : int -> int -> string
val guild_member_role : int -> int -> int -> string
val guild_bans : int -> string
val guild_ban : int -> int -> string
val guild_roles : int -> string
val guild_role : int -> int -> string
val guild_prune : int -> string
val guild_voice_regions : int -> string
val guild_invites : int -> string
val guild_integrations : int -> string
val guild_integration : int -> int -> string
val guild_integration_sync : int -> int -> string
val guild_embed : int -> string
val guild_emojis : int -> string
val guild_emoji : int -> int -> string
val webhooks_guild : int -> string
val webhooks_channel : int -> string
val webhook : int -> string
val webhook_token : int -> string -> string
val webhook_git : int -> string -> string
val webhook_slack : int -> string -> string
val user : int -> string
val me : string
val me_guilds : string
val me_guild : int -> string
val me_channels : string
val me_connections : string
val invite : string -> string
val regions : string
val application_information : string
val group_recipient : int -> int -> string
val guild_me_nick : int -> string
val guild_vanity_url : int -> string
val guild_audit_logs : int -> string
val cdn_embed_avatar : string -> string
val cdn_emoji : string -> string -> string
val cdn_icon : int -> string -> string -> string
val cdn_avatar : int -> string -> string -> string
val cdn_default_avatar : int -> string
\ No newline at end of file +Disml__Endpoints (disml.Disml__Endpoints)

Module Disml__Endpoints

Endpoint formatters used internally.

val gateway : string
val gateway_bot : string
val channel : int -> string
val channel_messages : int -> string
val channel_message : int -> int -> string
val channel_reaction_me : int -> int -> string -> string
val channel_reaction : int -> int -> string -> int -> string
val channel_reactions_get : int -> int -> string -> string
val channel_reactions_delete : int -> int -> string
val channel_bulk_delete : int -> string
val channel_permission : int -> int -> string
val channel_permissions : int -> string
val channels : string
val channel_call_ring : int -> string
val channel_invites : int -> string
val channel_typing : int -> string
val channel_pins : int -> string
val channel_pin : int -> int -> string
val guilds : string
val guild : int -> string
val guild_channels : int -> string
val guild_members : int -> string
val guild_member : int -> int -> string
val guild_member_role : int -> int -> int -> string
val guild_bans : int -> string
val guild_ban : int -> int -> string
val guild_roles : int -> string
val guild_role : int -> int -> string
val guild_prune : int -> string
val guild_voice_regions : int -> string
val guild_invites : int -> string
val guild_integrations : int -> string
val guild_integration : int -> int -> string
val guild_integration_sync : int -> int -> string
val guild_embed : int -> string
val guild_emojis : int -> string
val guild_emoji : int -> int -> string
val webhooks_guild : int -> string
val webhooks_channel : int -> string
val webhook : int -> string
val webhook_token : int -> string -> string
val webhook_git : int -> string -> string
val webhook_slack : int -> string -> string
val user : int -> string
val me : string
val me_guilds : string
val me_guild : int -> string
val me_channels : string
val me_connections : string
val invite : string -> string
val regions : string
val application_information : string
val group_recipient : int -> int -> string
val guild_me_nick : int -> string
val guild_vanity_url : int -> string
val guild_audit_logs : int -> string
val cdn_embed_avatar : string -> string
val cdn_emoji : string -> string -> string
val cdn_icon : int -> string -> string -> string
val cdn_avatar : int -> string -> string -> string
val cdn_default_avatar : int -> string
\ No newline at end of file diff --git a/docs/disml/Disml__Event/index.html b/docs/disml/Disml__Event/index.html index 42071ab..ea15cf9 100644 --- a/docs/disml/Disml__Event/index.html +++ b/docs/disml/Disml__Event/index.html @@ -1,2 +1,2 @@ -Disml__Event (disml.Disml__Event)

Module Disml__Event

exception Invalid_event of string
type t =
| HELLO of Yojson.Safe.json
| READY of Yojson.Safe.json
| RESUMED of Yojson.Safe.json
| INVALID_SESSION of Yojson.Safe.json
| CHANNEL_CREATE of Disml.Channel_t.t
| CHANNEL_UPDATE of Disml.Channel_t.t
| CHANNEL_DELETE of Disml.Channel_t.t
| CHANNEL_PINS_UPDATE of Yojson.Safe.json
| GUILD_CREATE of Disml.Guild_t.t
| GUILD_UPDATE of Disml.Guild_t.t
| GUILD_DELETE of Disml.Guild_t.t
| GUILD_BAN_ADD of Disml.Ban_t.t
| GUILD_BAN_REMOVE of Disml.Ban_t.t
| GUILD_EMOJIS_UPDATE of Yojson.Safe.json
| GUILD_INTEGRATIONS_UPDATE of Yojson.Safe.json
| GUILD_MEMBER_ADD of Disml.Member_t.t
| GUILD_MEMBER_REMOVE of Disml.Member_t.member_wrapper
| GUILD_MEMBER_UPDATE of Disml.Member_t.member_update
| GUILD_MEMBERS_CHUNK of Disml.Member_t.t list
| GUILD_ROLE_CREATE of Disml.Role_t.t
| GUILD_ROLE_UPDATE of Disml.Role_t.t
| GUILD_ROLE_DELETE of Disml.Role_t.t
| MESSAGE_CREATE of Disml.Message_t.t
| MESSAGE_UPDATE of Disml.Message_t.message_update
| MESSAGE_DELETE of Disml.Snowflake.t * Disml.Snowflake.t
| MESSAGE_BULK_DELETE of Disml.Snowflake.t list
| MESSAGE_REACTION_ADD of Disml.Reaction_t.reaction_event
| MESSAGE_REACTION_REMOVE of Disml.Reaction_t.reaction_event
| MESSAGE_REACTION_REMOVE_ALL of Disml.Reaction_t.t list
| PRESENCE_UPDATE of Disml.Presence.t
| TYPING_START of Yojson.Safe.json
| USER_UPDATE of Yojson.Safe.json
| VOICE_STATE_UPDATE of Yojson.Safe.json
| VOICE_SERVER_UPDATE of Yojson.Safe.json
| WEBHOOKS_UPDATE of Yojson.Safe.json
val event_of_yojson : contents:Yojson.Safe.json -> string -> t
val dispatch : t -> unit
val handle_event : ev:string -> Yojson.Safe.json -> unit
\ No newline at end of file +Disml__Event (disml.Disml__Event)

Module Disml__Event

Barebones of event dispatching. Most users will have no reason to look here.

exception Invalid_event of string

Used internally when received an unknown event. Is caught and logged.

type t =
| HELLO of Yojson.Safe.json
| READY of Yojson.Safe.json
| RESUMED of Yojson.Safe.json
| INVALID_SESSION of Yojson.Safe.json
| CHANNEL_CREATE of Disml.Channel_t.t
| CHANNEL_UPDATE of Disml.Channel_t.t
| CHANNEL_DELETE of Disml.Channel_t.t
| CHANNEL_PINS_UPDATE of Yojson.Safe.json
| GUILD_CREATE of Disml.Guild_t.t
| GUILD_UPDATE of Disml.Guild_t.t
| GUILD_DELETE of Disml.Guild_t.t
| GUILD_BAN_ADD of Disml.Ban_t.t
| GUILD_BAN_REMOVE of Disml.Ban_t.t
| GUILD_EMOJIS_UPDATE of Yojson.Safe.json
| GUILD_INTEGRATIONS_UPDATE of Yojson.Safe.json
| GUILD_MEMBER_ADD of Disml.Member_t.t
| GUILD_MEMBER_REMOVE of Disml.Member_t.member_wrapper
| GUILD_MEMBER_UPDATE of Disml.Member_t.member_update
| GUILD_MEMBERS_CHUNK of Disml.Member_t.t list
| GUILD_ROLE_CREATE of Disml.Role_t.t
| GUILD_ROLE_UPDATE of Disml.Role_t.t
| GUILD_ROLE_DELETE of Disml.Role_t.t
| MESSAGE_CREATE of Disml.Message_t.t
| MESSAGE_UPDATE of Disml.Message_t.message_update
| MESSAGE_DELETE of Disml.Snowflake.t * Disml.Snowflake.t
| MESSAGE_BULK_DELETE of Disml.Snowflake.t list
| MESSAGE_REACTION_ADD of Disml.Reaction_t.reaction_event
| MESSAGE_REACTION_REMOVE of Disml.Reaction_t.reaction_event
| MESSAGE_REACTION_REMOVE_ALL of Disml.Reaction_t.t list
| PRESENCE_UPDATE of Disml.Presence.t
| TYPING_START of Yojson.Safe.json
| USER_UPDATE of Yojson.Safe.json
| VOICE_STATE_UPDATE of Yojson.Safe.json
| VOICE_SERVER_UPDATE of Yojson.Safe.json
| WEBHOOKS_UPDATE of Yojson.Safe.json

Event dispatch type wrapper. Used internally.

val event_of_yojson : contents:Yojson.Safe.json -> string -> t

Used to convert an event string and payload into a t wrapper type.

val dispatch : t -> unit

Sends the event to the registered handler.

val handle_event : ev:string -> Yojson.Safe.json -> unit

Wrapper to other functions. This is called from the shards.

\ No newline at end of file diff --git a/docs/disml/Disml__Guild/index.html b/docs/disml/Disml__Guild/index.html index fb8d88e..ec49cd2 100644 --- a/docs/disml/Disml__Guild/index.html +++ b/docs/disml/Disml__Guild/index.html @@ -1,2 +1,2 @@ -Disml__Guild (disml.Disml__Guild)

Module Disml__Guild

include module type of Disml.Guild_t
type pre = {
id : Disml.Snowflake.t;
name : string;
icon : string option;
splash : string option;
owner_id : Disml.Snowflake.t;
region : string;
afk_channel_id : Disml.Snowflake.t option;
afk_timeout : int;
embed_enabled : bool option;
embed_channel_id : Disml.Snowflake.t option;
verification_level : int;
default_message_notifications : int;
explicit_content_filter : int;
roles : Disml.Role_t.role list;
emojis : Disml.Emoji.t list;
features : string list;
mfa_level : int;
application_id : Disml.Snowflake.t option;
widget_enabled : bool option;
widget_channel : Disml.Channel_t.channel_wrapper option;
system_channel : Disml.Channel_t.channel_wrapper option;
large : bool;
unavailable : bool;
member_count : int option;
members : Disml.Member_t.member list;
channels : Disml.Channel_t.channel_wrapper list;
}
val pre_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> pre
val sexp_of_pre : pre -> Ppx_sexp_conv_lib.Sexp.t
val pre_to_yojson : pre -> Yojson.Safe.json
val pre_of_yojson : Yojson.Safe.json -> pre Ppx_deriving_yojson_runtime.error_or
val _ : pre -> Yojson.Safe.json
val _ : Yojson.Safe.json -> pre Ppx_deriving_yojson_runtime.error_or
val pre_of_yojson_exn : Yojson.Safe.json -> pre
val _ : Yojson.Safe.json -> pre
type t = {
id : Disml.Snowflake.t;
name : string;
icon : string option;
splash : string option;
owner_id : Disml.Snowflake.t;
region : string;
afk_channel_id : Disml.Snowflake.t option;
afk_timeout : int;
embed_enabled : bool option;
embed_channel_id : Disml.Snowflake.t option;
verification_level : int;
default_message_notifications : int;
explicit_content_filter : int;
roles : Disml.Role_t.t list;
emojis : Disml.Emoji.t list;
features : string list;
mfa_level : int;
application_id : Disml.Snowflake.t option;
widget_enabled : bool option;
widget_channel : Disml.Channel_t.t option;
system_channel : Disml.Channel_t.t option;
large : bool;
unavailable : bool;
member_count : int option;
members : Disml.Member_t.t list;
channels : Disml.Channel_t.t list;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
val wrap : pre -> t
val ban_user : id:Disml.Snowflake.t -> ?⁠reason:string -> ?⁠days:int -> t -> unit Async.Deferred.Or_error.t
val create_emoji : name:string -> image:string -> t -> Disml.Emoji.t Async.Deferred.Or_error.t
val create_role : name:string -> ?⁠colour:int -> ?⁠permissions:int -> ?⁠hoist:bool -> ?⁠mentionable:bool -> t -> Disml.Role_t.t Async.Deferred.Or_error.t
val create_channel : mode:[ `Text | `Voice | `Category ] -> name:string -> t -> Disml.Channel_t.t Async.Deferred.Or_error.t
val delete : t -> unit Async.Deferred.Or_error.t
val get_ban : id:Disml.Snowflake.t -> t -> Disml.Ban_t.t Async.Deferred.Or_error.t
val get_bans : t -> Disml.Ban_t.t list Async.Deferred.Or_error.t
val get_channel : id:Disml.Snowflake.t -> t -> Disml.Channel_t.t Async.Deferred.Or_error.t
val get_emoji : id:Disml.Snowflake.t -> t -> Disml.Emoji.t Async.Deferred.Or_error.t
val get_invites : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val get_member : id:Disml.Snowflake.t -> t -> Disml.Member_t.t Async.Deferred.Or_error.t
val get_prune_count : days:int -> t -> int Async.Deferred.Or_error.t
val get_role : id:Disml.Snowflake.t -> t -> Disml.Role_t.t option
val get_webhooks : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val kick_user : id:Disml.Snowflake.t -> ?⁠reason:string -> t -> unit Async.Deferred.Or_error.t
val leave : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val list_voice_regions : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val prune : days:int -> t -> int Async.Deferred.Or_error.t
val request_members : t -> Disml.Member_t.t list Async.Deferred.Or_error.t
val set_afk_channel : id:Disml.Snowflake.t -> t -> t Async.Deferred.Or_error.t
val set_afk_timeout : timeout:int -> t -> t Async.Deferred.Or_error.t
val set_name : name:string -> t -> t Async.Deferred.Or_error.t
val set_icon : icon:string -> t -> t Async.Deferred.Or_error.t
val unban_user : id:Disml.Snowflake.t -> ?⁠reason:string -> t -> unit Async.Deferred.Or_error.t
\ No newline at end of file +Disml__Guild (disml.Disml__Guild)

Module Disml__Guild

include module type of Disml.Guild_t
type pre = {
id : Disml.Snowflake.t;
name : string;
icon : string option;
splash : string option;
owner_id : Disml.Snowflake.t;
region : string;
afk_channel_id : Disml.Snowflake.t option;
afk_timeout : int;
embed_enabled : bool option;
embed_channel_id : Disml.Snowflake.t option;
verification_level : int;
default_message_notifications : int;
explicit_content_filter : int;
roles : Disml.Role_t.role list;
emojis : Disml.Emoji.t list;
features : string list;
mfa_level : int;
application_id : Disml.Snowflake.t option;
widget_enabled : bool option;
widget_channel : Disml.Channel_t.channel_wrapper option;
system_channel : Disml.Channel_t.channel_wrapper option;
large : bool;
unavailable : bool;
member_count : int option;
members : Disml.Member_t.member list;
channels : Disml.Channel_t.channel_wrapper list;
}
val pre_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> pre
val sexp_of_pre : pre -> Ppx_sexp_conv_lib.Sexp.t
val pre_to_yojson : pre -> Yojson.Safe.json
val pre_of_yojson : Yojson.Safe.json -> pre Ppx_deriving_yojson_runtime.error_or
val pre_of_yojson_exn : Yojson.Safe.json -> pre
type t = {
id : Disml.Snowflake.t;
name : string;
icon : string option;
splash : string option;
owner_id : Disml.Snowflake.t;
region : string;
afk_channel_id : Disml.Snowflake.t option;
afk_timeout : int;
embed_enabled : bool option;
embed_channel_id : Disml.Snowflake.t option;
verification_level : int;
default_message_notifications : int;
explicit_content_filter : int;
roles : Disml.Role_t.t list;
emojis : Disml.Emoji.t list;
features : string list;
mfa_level : int;
application_id : Disml.Snowflake.t option;
widget_enabled : bool option;
widget_channel : Disml.Channel_t.t option;
system_channel : Disml.Channel_t.t option;
large : bool;
unavailable : bool;
member_count : int option;
members : Disml.Member_t.t list;
channels : Disml.Channel_t.t list;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val wrap : pre -> t
val ban_user : id:Disml.Snowflake.t -> ?⁠reason:string -> ?⁠days:int -> t -> unit Async.Deferred.Or_error.t
val create_emoji : name:string -> image:string -> t -> Disml.Emoji.t Async.Deferred.Or_error.t
val create_role : name:string -> ?⁠colour:int -> ?⁠permissions:int -> ?⁠hoist:bool -> ?⁠mentionable:bool -> t -> Disml.Role_t.t Async.Deferred.Or_error.t
val create_channel : mode:[ `Text | `Voice | `Category ] -> name:string -> t -> Disml.Channel_t.t Async.Deferred.Or_error.t
val delete : t -> unit Async.Deferred.Or_error.t
val get_ban : id:Disml.Snowflake.t -> t -> Disml.Ban_t.t Async.Deferred.Or_error.t
val get_bans : t -> Disml.Ban_t.t list Async.Deferred.Or_error.t
val get_channel : id:Disml.Snowflake.t -> t -> Disml.Channel_t.t Async.Deferred.Or_error.t
val get_emoji : id:Disml.Snowflake.t -> t -> Disml.Emoji.t Async.Deferred.Or_error.t
val get_invites : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val get_member : id:Disml.Snowflake.t -> t -> Disml.Member_t.t Async.Deferred.Or_error.t
val get_prune_count : days:int -> t -> int Async.Deferred.Or_error.t
val get_role : id:Disml.Snowflake.t -> t -> Disml.Role_t.t option
val get_webhooks : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val kick_user : id:Disml.Snowflake.t -> ?⁠reason:string -> t -> unit Async.Deferred.Or_error.t
val leave : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val list_voice_regions : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val prune : days:int -> t -> int Async.Deferred.Or_error.t
val request_members : t -> Disml.Member_t.t list Async.Deferred.Or_error.t
val set_afk_channel : id:Disml.Snowflake.t -> t -> t Async.Deferred.Or_error.t
val set_afk_timeout : timeout:int -> t -> t Async.Deferred.Or_error.t
val set_name : name:string -> t -> t Async.Deferred.Or_error.t
val set_icon : icon:string -> t -> t Async.Deferred.Or_error.t
val unban_user : id:Disml.Snowflake.t -> ?⁠reason:string -> t -> unit Async.Deferred.Or_error.t
\ No newline at end of file diff --git a/docs/disml/Disml__Guild_t/index.html b/docs/disml/Disml__Guild_t/index.html index d0baea2..cafc0f3 100644 --- a/docs/disml/Disml__Guild_t/index.html +++ b/docs/disml/Disml__Guild_t/index.html @@ -1,2 +1,2 @@ -Disml__Guild_t (disml.Disml__Guild_t)

Module Disml__Guild_t

type pre = {
id : Disml.Snowflake.t;
name : string;
icon : string option;
splash : string option;
owner_id : Disml.Snowflake.t;
region : string;
afk_channel_id : Disml.Snowflake.t option;
afk_timeout : int;
embed_enabled : bool option;
embed_channel_id : Disml.Snowflake.t option;
verification_level : int;
default_message_notifications : int;
explicit_content_filter : int;
roles : Disml.Role_t.role list;
emojis : Disml.Emoji.t list;
features : string list;
mfa_level : int;
application_id : Disml.Snowflake.t option;
widget_enabled : bool option;
widget_channel : Disml.Channel_t.channel_wrapper option;
system_channel : Disml.Channel_t.channel_wrapper option;
large : bool;
unavailable : bool;
member_count : int option;
members : Disml.Member_t.member list;
channels : Disml.Channel_t.channel_wrapper list;
}
val pre_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> pre
val sexp_of_pre : pre -> Ppx_sexp_conv_lib.Sexp.t
val pre_to_yojson : pre -> Yojson.Safe.json
val pre_of_yojson : Yojson.Safe.json -> pre Ppx_deriving_yojson_runtime.error_or
val _ : pre -> Yojson.Safe.json
val _ : Yojson.Safe.json -> pre Ppx_deriving_yojson_runtime.error_or
val pre_of_yojson_exn : Yojson.Safe.json -> pre
val _ : Yojson.Safe.json -> pre
type t = {
id : Disml.Snowflake.t;
name : string;
icon : string option;
splash : string option;
owner_id : Disml.Snowflake.t;
region : string;
afk_channel_id : Disml.Snowflake.t option;
afk_timeout : int;
embed_enabled : bool option;
embed_channel_id : Disml.Snowflake.t option;
verification_level : int;
default_message_notifications : int;
explicit_content_filter : int;
roles : Disml.Role_t.t list;
emojis : Disml.Emoji.t list;
features : string list;
mfa_level : int;
application_id : Disml.Snowflake.t option;
widget_enabled : bool option;
widget_channel : Disml.Channel_t.t option;
system_channel : Disml.Channel_t.t option;
large : bool;
unavailable : bool;
member_count : int option;
members : Disml.Member_t.t list;
channels : Disml.Channel_t.t list;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
val wrap : pre -> t
\ No newline at end of file +Disml__Guild_t (disml.Disml__Guild_t)

Module Disml__Guild_t

type pre = {
id : Disml.Snowflake.t;
name : string;
icon : string option;
splash : string option;
owner_id : Disml.Snowflake.t;
region : string;
afk_channel_id : Disml.Snowflake.t option;
afk_timeout : int;
embed_enabled : bool option;
embed_channel_id : Disml.Snowflake.t option;
verification_level : int;
default_message_notifications : int;
explicit_content_filter : int;
roles : Disml.Role_t.role list;
emojis : Disml.Emoji.t list;
features : string list;
mfa_level : int;
application_id : Disml.Snowflake.t option;
widget_enabled : bool option;
widget_channel : Disml.Channel_t.channel_wrapper option;
system_channel : Disml.Channel_t.channel_wrapper option;
large : bool;
unavailable : bool;
member_count : int option;
members : Disml.Member_t.member list;
channels : Disml.Channel_t.channel_wrapper list;
}
val pre_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> pre
val sexp_of_pre : pre -> Ppx_sexp_conv_lib.Sexp.t
val pre_to_yojson : pre -> Yojson.Safe.json
val pre_of_yojson : Yojson.Safe.json -> pre Ppx_deriving_yojson_runtime.error_or
val pre_of_yojson_exn : Yojson.Safe.json -> pre
type t = {
id : Disml.Snowflake.t;
name : string;
icon : string option;
splash : string option;
owner_id : Disml.Snowflake.t;
region : string;
afk_channel_id : Disml.Snowflake.t option;
afk_timeout : int;
embed_enabled : bool option;
embed_channel_id : Disml.Snowflake.t option;
verification_level : int;
default_message_notifications : int;
explicit_content_filter : int;
roles : Disml.Role_t.t list;
emojis : Disml.Emoji.t list;
features : string list;
mfa_level : int;
application_id : Disml.Snowflake.t option;
widget_enabled : bool option;
widget_channel : Disml.Channel_t.t option;
system_channel : Disml.Channel_t.t option;
large : bool;
unavailable : bool;
member_count : int option;
members : Disml.Member_t.t list;
channels : Disml.Channel_t.t list;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val wrap : pre -> t
\ No newline at end of file diff --git a/docs/disml/Disml__Member/index.html b/docs/disml/Disml__Member/index.html index b05b751..09cd5a8 100644 --- a/docs/disml/Disml__Member/index.html +++ b/docs/disml/Disml__Member/index.html @@ -1,2 +1,2 @@ -Disml__Member (disml.Disml__Member)

Module Disml__Member

include module type of Disml.Member_t
type partial_member = {
nick : string option;
roles : Disml.Snowflake.t list;
joined_at : string;
deaf : bool;
mute : bool;
}
val partial_member_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> partial_member
val sexp_of_partial_member : partial_member -> Ppx_sexp_conv_lib.Sexp.t
val partial_member_to_yojson : partial_member -> Yojson.Safe.json
val partial_member_of_yojson : Yojson.Safe.json -> partial_member Ppx_deriving_yojson_runtime.error_or
val _ : partial_member -> Yojson.Safe.json
val _ : Yojson.Safe.json -> partial_member Ppx_deriving_yojson_runtime.error_or
val partial_member_of_yojson_exn : Yojson.Safe.json -> partial_member
val _ : Yojson.Safe.json -> partial_member
type member = {
nick : string option;
roles : Disml.Snowflake.t list;
joined_at : string;
deaf : bool;
mute : bool;
user : Disml.User_t.t;
}
val member_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> member
val sexp_of_member : member -> Ppx_sexp_conv_lib.Sexp.t
val member_to_yojson : member -> Yojson.Safe.json
val member_of_yojson : Yojson.Safe.json -> member Ppx_deriving_yojson_runtime.error_or
val _ : member -> Yojson.Safe.json
val _ : Yojson.Safe.json -> member Ppx_deriving_yojson_runtime.error_or
val member_of_yojson_exn : Yojson.Safe.json -> member
val _ : Yojson.Safe.json -> member
type member_wrapper = {
guild_id : Disml.Snowflake.t;
user : Disml.User_t.t;
}
val member_wrapper_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> member_wrapper
val sexp_of_member_wrapper : member_wrapper -> Ppx_sexp_conv_lib.Sexp.t
val member_wrapper_to_yojson : member_wrapper -> Yojson.Safe.json
val member_wrapper_of_yojson : Yojson.Safe.json -> member_wrapper Ppx_deriving_yojson_runtime.error_or
val _ : member_wrapper -> Yojson.Safe.json
val _ : Yojson.Safe.json -> member_wrapper Ppx_deriving_yojson_runtime.error_or
val member_wrapper_of_yojson_exn : Yojson.Safe.json -> member_wrapper
val _ : Yojson.Safe.json -> member_wrapper
type member_update = {
guild_id : Disml.Snowflake.t;
roles : Disml.Snowflake.t list;
user : Disml.User_t.t;
nick : string option;
}
val member_update_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> member_update
val sexp_of_member_update : member_update -> Ppx_sexp_conv_lib.Sexp.t
val member_update_to_yojson : member_update -> Yojson.Safe.json
val member_update_of_yojson : Yojson.Safe.json -> member_update Ppx_deriving_yojson_runtime.error_or
val _ : member_update -> Yojson.Safe.json
val _ : Yojson.Safe.json -> member_update Ppx_deriving_yojson_runtime.error_or
val member_update_of_yojson_exn : Yojson.Safe.json -> member_update
val _ : Yojson.Safe.json -> member_update
type t = {
nick : string option;
roles : Disml.Snowflake.t list;
joined_at : string;
deaf : bool;
mute : bool;
user : Disml.User_t.t;
guild_id : Disml.Snowflake.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
val wrap : guild_id:Disml.Snowflake.t -> member -> t
val add_role : role:Disml.Role_t.t -> Disml.Member_t.t -> unit Async.Deferred.Or_error.t
val remove_role : role:Disml.Role_t.t -> Disml.Member_t.t -> unit Async.Deferred.Or_error.t
val ban : ?⁠reason:string -> ?⁠days:int -> Disml.Member_t.t -> unit Async.Deferred.Or_error.t
val kick : ?⁠reason:string -> Disml.Member_t.t -> unit Async.Deferred.Or_error.t
val mute : Disml.Member_t.t -> unit Async.Deferred.Or_error.t
val deafen : Disml.Member_t.t -> unit Async.Deferred.Or_error.t
val unmute : Disml.Member_t.t -> unit Async.Deferred.Or_error.t
val undeafen : Disml.Member_t.t -> unit Async.Deferred.Or_error.t
\ No newline at end of file +Disml__Member (disml.Disml__Member)

Module Disml__Member

include module type of Disml.Member_t
type partial_member = {
nick : string option;
roles : Disml.Snowflake.t list;
joined_at : string;
deaf : bool;
mute : bool;
}
val partial_member_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> partial_member
val sexp_of_partial_member : partial_member -> Ppx_sexp_conv_lib.Sexp.t
val partial_member_to_yojson : partial_member -> Yojson.Safe.json
val partial_member_of_yojson : Yojson.Safe.json -> partial_member Ppx_deriving_yojson_runtime.error_or
val partial_member_of_yojson_exn : Yojson.Safe.json -> partial_member
type member = {
nick : string option;
roles : Disml.Snowflake.t list;
joined_at : string;
deaf : bool;
mute : bool;
user : Disml.User_t.t;
}
val member_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> member
val sexp_of_member : member -> Ppx_sexp_conv_lib.Sexp.t
val member_to_yojson : member -> Yojson.Safe.json
val member_of_yojson : Yojson.Safe.json -> member Ppx_deriving_yojson_runtime.error_or
val member_of_yojson_exn : Yojson.Safe.json -> member
type member_wrapper = {
guild_id : Disml.Snowflake.t;
user : Disml.User_t.t;
}
val member_wrapper_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> member_wrapper
val sexp_of_member_wrapper : member_wrapper -> Ppx_sexp_conv_lib.Sexp.t
val member_wrapper_to_yojson : member_wrapper -> Yojson.Safe.json
val member_wrapper_of_yojson : Yojson.Safe.json -> member_wrapper Ppx_deriving_yojson_runtime.error_or
val member_wrapper_of_yojson_exn : Yojson.Safe.json -> member_wrapper
type member_update = {
guild_id : Disml.Snowflake.t;
roles : Disml.Snowflake.t list;
user : Disml.User_t.t;
nick : string option;
}
val member_update_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> member_update
val sexp_of_member_update : member_update -> Ppx_sexp_conv_lib.Sexp.t
val member_update_to_yojson : member_update -> Yojson.Safe.json
val member_update_of_yojson : Yojson.Safe.json -> member_update Ppx_deriving_yojson_runtime.error_or
val member_update_of_yojson_exn : Yojson.Safe.json -> member_update
type t = {
nick : string option;
roles : Disml.Snowflake.t list;
joined_at : string;
deaf : bool;
mute : bool;
user : Disml.User_t.t;
guild_id : Disml.Snowflake.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val wrap : guild_id:Disml.Snowflake.t -> member -> t
val add_role : role:Disml.Role_t.t -> Disml.Member_t.t -> unit Async.Deferred.Or_error.t
val remove_role : role:Disml.Role_t.t -> Disml.Member_t.t -> unit Async.Deferred.Or_error.t
val ban : ?⁠reason:string -> ?⁠days:int -> Disml.Member_t.t -> unit Async.Deferred.Or_error.t
val kick : ?⁠reason:string -> Disml.Member_t.t -> unit Async.Deferred.Or_error.t
val mute : Disml.Member_t.t -> unit Async.Deferred.Or_error.t
val deafen : Disml.Member_t.t -> unit Async.Deferred.Or_error.t
val unmute : Disml.Member_t.t -> unit Async.Deferred.Or_error.t
val undeafen : Disml.Member_t.t -> unit Async.Deferred.Or_error.t
\ No newline at end of file diff --git a/docs/disml/Disml__Member_t/index.html b/docs/disml/Disml__Member_t/index.html index 0b11f2c..8a5ef8b 100644 --- a/docs/disml/Disml__Member_t/index.html +++ b/docs/disml/Disml__Member_t/index.html @@ -1,2 +1,2 @@ -Disml__Member_t (disml.Disml__Member_t)

Module Disml__Member_t

type partial_member = {
nick : string option;
roles : Disml.Snowflake.t list;
joined_at : string;
deaf : bool;
mute : bool;
}
val partial_member_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> partial_member
val sexp_of_partial_member : partial_member -> Ppx_sexp_conv_lib.Sexp.t
val partial_member_to_yojson : partial_member -> Yojson.Safe.json
val partial_member_of_yojson : Yojson.Safe.json -> partial_member Ppx_deriving_yojson_runtime.error_or
val _ : partial_member -> Yojson.Safe.json
val _ : Yojson.Safe.json -> partial_member Ppx_deriving_yojson_runtime.error_or
val partial_member_of_yojson_exn : Yojson.Safe.json -> partial_member
val _ : Yojson.Safe.json -> partial_member
type member = {
nick : string option;
roles : Disml.Snowflake.t list;
joined_at : string;
deaf : bool;
mute : bool;
user : Disml.User_t.t;
}
val member_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> member
val sexp_of_member : member -> Ppx_sexp_conv_lib.Sexp.t
val member_to_yojson : member -> Yojson.Safe.json
val member_of_yojson : Yojson.Safe.json -> member Ppx_deriving_yojson_runtime.error_or
val _ : member -> Yojson.Safe.json
val _ : Yojson.Safe.json -> member Ppx_deriving_yojson_runtime.error_or
val member_of_yojson_exn : Yojson.Safe.json -> member
val _ : Yojson.Safe.json -> member
type member_wrapper = {
guild_id : Disml.Snowflake.t;
user : Disml.User_t.t;
}
val member_wrapper_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> member_wrapper
val sexp_of_member_wrapper : member_wrapper -> Ppx_sexp_conv_lib.Sexp.t
val member_wrapper_to_yojson : member_wrapper -> Yojson.Safe.json
val member_wrapper_of_yojson : Yojson.Safe.json -> member_wrapper Ppx_deriving_yojson_runtime.error_or
val _ : member_wrapper -> Yojson.Safe.json
val _ : Yojson.Safe.json -> member_wrapper Ppx_deriving_yojson_runtime.error_or
val member_wrapper_of_yojson_exn : Yojson.Safe.json -> member_wrapper
val _ : Yojson.Safe.json -> member_wrapper
type member_update = {
guild_id : Disml.Snowflake.t;
roles : Disml.Snowflake.t list;
user : Disml.User_t.t;
nick : string option;
}
val member_update_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> member_update
val sexp_of_member_update : member_update -> Ppx_sexp_conv_lib.Sexp.t
val member_update_to_yojson : member_update -> Yojson.Safe.json
val member_update_of_yojson : Yojson.Safe.json -> member_update Ppx_deriving_yojson_runtime.error_or
val _ : member_update -> Yojson.Safe.json
val _ : Yojson.Safe.json -> member_update Ppx_deriving_yojson_runtime.error_or
val member_update_of_yojson_exn : Yojson.Safe.json -> member_update
val _ : Yojson.Safe.json -> member_update
type t = {
nick : string option;
roles : Disml.Snowflake.t list;
joined_at : string;
deaf : bool;
mute : bool;
user : Disml.User_t.t;
guild_id : Disml.Snowflake.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
val wrap : guild_id:Disml.Snowflake.t -> member -> t
\ No newline at end of file +Disml__Member_t (disml.Disml__Member_t)

Module Disml__Member_t

type partial_member = {
nick : string option;
roles : Disml.Snowflake.t list;
joined_at : string;
deaf : bool;
mute : bool;
}
val partial_member_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> partial_member
val sexp_of_partial_member : partial_member -> Ppx_sexp_conv_lib.Sexp.t
val partial_member_to_yojson : partial_member -> Yojson.Safe.json
val partial_member_of_yojson : Yojson.Safe.json -> partial_member Ppx_deriving_yojson_runtime.error_or
val partial_member_of_yojson_exn : Yojson.Safe.json -> partial_member
type member = {
nick : string option;
roles : Disml.Snowflake.t list;
joined_at : string;
deaf : bool;
mute : bool;
user : Disml.User_t.t;
}
val member_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> member
val sexp_of_member : member -> Ppx_sexp_conv_lib.Sexp.t
val member_to_yojson : member -> Yojson.Safe.json
val member_of_yojson : Yojson.Safe.json -> member Ppx_deriving_yojson_runtime.error_or
val member_of_yojson_exn : Yojson.Safe.json -> member
type member_wrapper = {
guild_id : Disml.Snowflake.t;
user : Disml.User_t.t;
}
val member_wrapper_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> member_wrapper
val sexp_of_member_wrapper : member_wrapper -> Ppx_sexp_conv_lib.Sexp.t
val member_wrapper_to_yojson : member_wrapper -> Yojson.Safe.json
val member_wrapper_of_yojson : Yojson.Safe.json -> member_wrapper Ppx_deriving_yojson_runtime.error_or
val member_wrapper_of_yojson_exn : Yojson.Safe.json -> member_wrapper
type member_update = {
guild_id : Disml.Snowflake.t;
roles : Disml.Snowflake.t list;
user : Disml.User_t.t;
nick : string option;
}
val member_update_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> member_update
val sexp_of_member_update : member_update -> Ppx_sexp_conv_lib.Sexp.t
val member_update_to_yojson : member_update -> Yojson.Safe.json
val member_update_of_yojson : Yojson.Safe.json -> member_update Ppx_deriving_yojson_runtime.error_or
val member_update_of_yojson_exn : Yojson.Safe.json -> member_update
type t = {
nick : string option;
roles : Disml.Snowflake.t list;
joined_at : string;
deaf : bool;
mute : bool;
user : Disml.User_t.t;
guild_id : Disml.Snowflake.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val wrap : guild_id:Disml.Snowflake.t -> member -> t
\ No newline at end of file diff --git a/docs/disml/Disml__Message/index.html b/docs/disml/Disml__Message/index.html index c9a7e04..522ee5b 100644 --- a/docs/disml/Disml__Message/index.html +++ b/docs/disml/Disml__Message/index.html @@ -1,2 +1,2 @@ -Disml__Message (disml.Disml__Message)

Module Disml__Message

include module type of Disml.Message_t
type message_update = {
id : Disml.Snowflake.t;
author : Disml.User_t.t option;
channel_id : Disml.Snowflake.t;
member : Disml.Member_t.partial_member option;
guild_id : Disml.Snowflake.t option;
content : string option;
timestamp : string option;
editedimestamp : string option;
tts : bool option;
mention_everyone : bool option;
mentions : Disml.Snowflake.t list;
role_mentions : Disml.Snowflake.t list;
attachments : Disml.Attachment.t list;
embeds : Disml.Embed.t list;
reactions : Disml.Snowflake.t list;
nonce : Disml.Snowflake.t option;
pinned : bool option;
webhook_id : Disml.Snowflake.t option;
kind : int option;
}
val message_update_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> message_update
val sexp_of_message_update : message_update -> Ppx_sexp_conv_lib.Sexp.t
val message_update_to_yojson : message_update -> Yojson.Safe.json
val message_update_of_yojson : Yojson.Safe.json -> message_update Ppx_deriving_yojson_runtime.error_or
val _ : message_update -> Yojson.Safe.json
val _ : Yojson.Safe.json -> message_update Ppx_deriving_yojson_runtime.error_or
val message_update_of_yojson_exn : Yojson.Safe.json -> message_update
val _ : Yojson.Safe.json -> message_update
type t = {
id : Disml.Snowflake.t;
author : Disml.User_t.t;
channel_id : Disml.Snowflake.t;
member : Disml.Member_t.partial_member option;
guild_id : Disml.Snowflake.t option;
content : string;
timestamp : string;
editedimestamp : string option;
tts : bool;
mention_everyone : bool;
attachments : Disml.Attachment.t list;
embeds : Disml.Embed.t list;
reactions : Disml.Snowflake.t list;
nonce : Disml.Snowflake.t option;
pinned : bool;
webhook_id : Disml.Snowflake.t option;
kind : int;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
val add_reaction : t -> Disml.Emoji.t -> unit Async.Deferred.Or_error.t
val remove_reaction : t -> Disml.Emoji.t -> Disml.User_t.t -> unit Async.Deferred.Or_error.t
val clear_reactions : t -> unit Async.Deferred.Or_error.t
val delete : t -> unit Async.Deferred.Or_error.t
val pin : t -> unit Async.Deferred.Or_error.t
val unpin : t -> unit Async.Deferred.Or_error.t
val reply : t -> string -> t Async.Deferred.Or_error.t
val set_content : t -> string -> t Async.Deferred.Or_error.t
val set_embed : t -> Disml.Embed.t -> t Async.Deferred.Or_error.t
\ No newline at end of file +Disml__Message (disml.Disml__Message)

Module Disml__Message

include module type of Disml.Message_t
type message_update = {
id : Disml.Snowflake.t;
author : Disml.User_t.t option;
channel_id : Disml.Snowflake.t;
member : Disml.Member_t.partial_member option;
guild_id : Disml.Snowflake.t option;
content : string option;
timestamp : string option;
editedimestamp : string option;
tts : bool option;
mention_everyone : bool option;
mentions : Disml.Snowflake.t list;
role_mentions : Disml.Snowflake.t list;
attachments : Disml.Attachment.t list;
embeds : Disml.Embed.t list;
reactions : Disml.Snowflake.t list;
nonce : Disml.Snowflake.t option;
pinned : bool option;
webhook_id : Disml.Snowflake.t option;
kind : int option;
}
val message_update_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> message_update
val sexp_of_message_update : message_update -> Ppx_sexp_conv_lib.Sexp.t
val message_update_to_yojson : message_update -> Yojson.Safe.json
val message_update_of_yojson : Yojson.Safe.json -> message_update Ppx_deriving_yojson_runtime.error_or
val message_update_of_yojson_exn : Yojson.Safe.json -> message_update
type t = {
id : Disml.Snowflake.t;
author : Disml.User_t.t;
channel_id : Disml.Snowflake.t;
member : Disml.Member_t.partial_member option;
guild_id : Disml.Snowflake.t option;
content : string;
timestamp : string;
editedimestamp : string option;
tts : bool;
mention_everyone : bool;
attachments : Disml.Attachment.t list;
embeds : Disml.Embed.t list;
reactions : Disml.Snowflake.t list;
nonce : Disml.Snowflake.t option;
pinned : bool;
webhook_id : Disml.Snowflake.t option;
kind : int;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val add_reaction : t -> Disml.Emoji.t -> unit Async.Deferred.Or_error.t
val remove_reaction : t -> Disml.Emoji.t -> Disml.User_t.t -> unit Async.Deferred.Or_error.t
val clear_reactions : t -> unit Async.Deferred.Or_error.t
val delete : t -> unit Async.Deferred.Or_error.t
val pin : t -> unit Async.Deferred.Or_error.t
val unpin : t -> unit Async.Deferred.Or_error.t
val reply : t -> string -> t Async.Deferred.Or_error.t
val reply_with : ?⁠embed:Disml.Embed.t -> ?⁠content:string -> ?⁠file:string -> ?⁠tts:bool -> t -> Disml.Message_t.t Async.Deferred.Or_error.t
val set_content : t -> string -> t Async.Deferred.Or_error.t
val set_embed : t -> Disml.Embed.t -> t Async.Deferred.Or_error.t
\ No newline at end of file diff --git a/docs/disml/Disml__Message_t/index.html b/docs/disml/Disml__Message_t/index.html index acf0eb7..5b28413 100644 --- a/docs/disml/Disml__Message_t/index.html +++ b/docs/disml/Disml__Message_t/index.html @@ -1,2 +1,2 @@ -Disml__Message_t (disml.Disml__Message_t)

Module Disml__Message_t

type message_update = {
id : Disml.Snowflake.t;
author : Disml.User_t.t option;
channel_id : Disml.Snowflake.t;
member : Disml.Member_t.partial_member option;
guild_id : Disml.Snowflake.t option;
content : string option;
timestamp : string option;
editedimestamp : string option;
tts : bool option;
mention_everyone : bool option;
mentions : Disml.Snowflake.t list;
role_mentions : Disml.Snowflake.t list;
attachments : Disml.Attachment.t list;
embeds : Disml.Embed.t list;
reactions : Disml.Snowflake.t list;
nonce : Disml.Snowflake.t option;
pinned : bool option;
webhook_id : Disml.Snowflake.t option;
kind : int option;
}
val message_update_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> message_update
val sexp_of_message_update : message_update -> Ppx_sexp_conv_lib.Sexp.t
val message_update_to_yojson : message_update -> Yojson.Safe.json
val message_update_of_yojson : Yojson.Safe.json -> message_update Ppx_deriving_yojson_runtime.error_or
val _ : message_update -> Yojson.Safe.json
val _ : Yojson.Safe.json -> message_update Ppx_deriving_yojson_runtime.error_or
val message_update_of_yojson_exn : Yojson.Safe.json -> message_update
val _ : Yojson.Safe.json -> message_update
type t = {
id : Disml.Snowflake.t;
author : Disml.User_t.t;
channel_id : Disml.Snowflake.t;
member : Disml.Member_t.partial_member option;
guild_id : Disml.Snowflake.t option;
content : string;
timestamp : string;
editedimestamp : string option;
tts : bool;
mention_everyone : bool;
attachments : Disml.Attachment.t list;
embeds : Disml.Embed.t list;
reactions : Disml.Snowflake.t list;
nonce : Disml.Snowflake.t option;
pinned : bool;
webhook_id : Disml.Snowflake.t option;
kind : int;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
\ No newline at end of file +Disml__Message_t (disml.Disml__Message_t)

Module Disml__Message_t

type message_update = {
id : Disml.Snowflake.t;
author : Disml.User_t.t option;
channel_id : Disml.Snowflake.t;
member : Disml.Member_t.partial_member option;
guild_id : Disml.Snowflake.t option;
content : string option;
timestamp : string option;
editedimestamp : string option;
tts : bool option;
mention_everyone : bool option;
mentions : Disml.Snowflake.t list;
role_mentions : Disml.Snowflake.t list;
attachments : Disml.Attachment.t list;
embeds : Disml.Embed.t list;
reactions : Disml.Snowflake.t list;
nonce : Disml.Snowflake.t option;
pinned : bool option;
webhook_id : Disml.Snowflake.t option;
kind : int option;
}
val message_update_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> message_update
val sexp_of_message_update : message_update -> Ppx_sexp_conv_lib.Sexp.t
val message_update_to_yojson : message_update -> Yojson.Safe.json
val message_update_of_yojson : Yojson.Safe.json -> message_update Ppx_deriving_yojson_runtime.error_or
val message_update_of_yojson_exn : Yojson.Safe.json -> message_update
type t = {
id : Disml.Snowflake.t;
author : Disml.User_t.t;
channel_id : Disml.Snowflake.t;
member : Disml.Member_t.partial_member option;
guild_id : Disml.Snowflake.t option;
content : string;
timestamp : string;
editedimestamp : string option;
tts : bool;
mention_everyone : bool;
attachments : Disml.Attachment.t list;
embeds : Disml.Embed.t list;
reactions : Disml.Snowflake.t list;
nonce : Disml.Snowflake.t option;
pinned : bool;
webhook_id : Disml.Snowflake.t option;
kind : int;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
\ No newline at end of file diff --git a/docs/disml/Disml__Opcode/index.html b/docs/disml/Disml__Opcode/index.html index af94661..3579318 100644 --- a/docs/disml/Disml__Opcode/index.html +++ b/docs/disml/Disml__Opcode/index.html @@ -1,2 +1,2 @@ -Disml__Opcode (disml.Disml__Opcode)

Module Disml__Opcode

type t =
| DISPATCH
| HEARTBEAT
| IDENTIFY
| STATUS_UPDATE
| VOICE_STATE_UPDATE
| RESUME
| RECONNECT
| REQUEST_GUILD_MEMBERS
| INVALID_SESSION
| HELLO
| HEARTBEAT_ACK
exception Invalid_Opcode of int
val to_int : t -> int
val from_int : int -> t
val to_string : t -> string
\ No newline at end of file +Disml__Opcode (disml.Disml__Opcode)

Module Disml__Opcode

Internal Opcode abstractions.

type t =
| DISPATCH
| HEARTBEAT
| IDENTIFY
| STATUS_UPDATE
| VOICE_STATE_UPDATE
| RESUME
| RECONNECT
| REQUEST_GUILD_MEMBERS
| INVALID_SESSION
| HELLO
| HEARTBEAT_ACK

Type of known opcodes.

exception Invalid_Opcode of int

Raised when receiving an invalid opcode. This should never occur.

val to_int : t -> int

Converts an opcode to its integer form for outgoing frames.

val from_int : int -> t

Converts an integer to an opcode for incoming frames. Raise Invalid_Opcode Raised when an unkown opcode is received.

val to_string : t -> string

Converts and opcode to a human-readable string. Used for logging purposes.

\ No newline at end of file diff --git a/docs/disml/Disml__Presence/index.html b/docs/disml/Disml__Presence/index.html index 9f69908..76e643b 100644 --- a/docs/disml/Disml__Presence/index.html +++ b/docs/disml/Disml__Presence/index.html @@ -1,2 +1,2 @@ -Disml__Presence (disml.Disml__Presence)

Module Disml__Presence

type t = {
user : Disml.User_t.partial_user;
roles : Disml.Snowflake.t list;
game : Disml.Activity.t option;
guild_id : Disml.Snowflake.t;
status : string;
activities : Disml.Activity.t list;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
\ No newline at end of file +Disml__Presence (disml.Disml__Presence)

Module Disml__Presence

type t = {
user : Disml.User_t.partial_user;
roles : Disml.Snowflake.t list;
game : Disml.Activity.t option;
guild_id : Disml.Snowflake.t;
status : string;
activities : Disml.Activity.t list;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
\ No newline at end of file diff --git a/docs/disml/Disml__Reaction/index.html b/docs/disml/Disml__Reaction/index.html index 109eb1e..22832de 100644 --- a/docs/disml/Disml__Reaction/index.html +++ b/docs/disml/Disml__Reaction/index.html @@ -1,2 +1,2 @@ -Disml__Reaction (disml.Disml__Reaction)

Module Disml__Reaction

include module type of Disml.Reaction_t
type reaction_event = {
user_id : Disml.Snowflake.t;
channel_id : Disml.Snowflake.t;
message_id : Disml.Snowflake.t;
guild_id : Disml.Snowflake.t option;
emoji : Disml.Emoji.partial_emoji;
}
val reaction_event_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> reaction_event
val sexp_of_reaction_event : reaction_event -> Ppx_sexp_conv_lib.Sexp.t
val reaction_event_to_yojson : reaction_event -> Yojson.Safe.json
val reaction_event_of_yojson : Yojson.Safe.json -> reaction_event Ppx_deriving_yojson_runtime.error_or
val _ : reaction_event -> Yojson.Safe.json
val _ : Yojson.Safe.json -> reaction_event Ppx_deriving_yojson_runtime.error_or
val reaction_event_of_yojson_exn : Yojson.Safe.json -> reaction_event
val _ : Yojson.Safe.json -> reaction_event
type t = {
count : int;
emoji : Disml.Emoji.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
\ No newline at end of file +Disml__Reaction (disml.Disml__Reaction)

Module Disml__Reaction

include module type of Disml.Reaction_t
type reaction_event = {
user_id : Disml.Snowflake.t;
channel_id : Disml.Snowflake.t;
message_id : Disml.Snowflake.t;
guild_id : Disml.Snowflake.t option;
emoji : Disml.Emoji.partial_emoji;
}
val reaction_event_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> reaction_event
val sexp_of_reaction_event : reaction_event -> Ppx_sexp_conv_lib.Sexp.t
val reaction_event_to_yojson : reaction_event -> Yojson.Safe.json
val reaction_event_of_yojson : Yojson.Safe.json -> reaction_event Ppx_deriving_yojson_runtime.error_or
val reaction_event_of_yojson_exn : Yojson.Safe.json -> reaction_event
type t = {
count : int;
emoji : Disml.Emoji.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
\ No newline at end of file diff --git a/docs/disml/Disml__Reaction_t/index.html b/docs/disml/Disml__Reaction_t/index.html index 0b9e12b..f3a9571 100644 --- a/docs/disml/Disml__Reaction_t/index.html +++ b/docs/disml/Disml__Reaction_t/index.html @@ -1,2 +1,2 @@ -Disml__Reaction_t (disml.Disml__Reaction_t)

Module Disml__Reaction_t

type reaction_event = {
user_id : Disml.Snowflake.t;
channel_id : Disml.Snowflake.t;
message_id : Disml.Snowflake.t;
guild_id : Disml.Snowflake.t option;
emoji : Disml.Emoji.partial_emoji;
}
val reaction_event_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> reaction_event
val sexp_of_reaction_event : reaction_event -> Ppx_sexp_conv_lib.Sexp.t
val reaction_event_to_yojson : reaction_event -> Yojson.Safe.json
val reaction_event_of_yojson : Yojson.Safe.json -> reaction_event Ppx_deriving_yojson_runtime.error_or
val _ : reaction_event -> Yojson.Safe.json
val _ : Yojson.Safe.json -> reaction_event Ppx_deriving_yojson_runtime.error_or
val reaction_event_of_yojson_exn : Yojson.Safe.json -> reaction_event
val _ : Yojson.Safe.json -> reaction_event
type t = {
count : int;
emoji : Disml.Emoji.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
\ No newline at end of file +Disml__Reaction_t (disml.Disml__Reaction_t)

Module Disml__Reaction_t

type reaction_event = {
user_id : Disml.Snowflake.t;
channel_id : Disml.Snowflake.t;
message_id : Disml.Snowflake.t;
guild_id : Disml.Snowflake.t option;
emoji : Disml.Emoji.partial_emoji;
}
val reaction_event_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> reaction_event
val sexp_of_reaction_event : reaction_event -> Ppx_sexp_conv_lib.Sexp.t
val reaction_event_to_yojson : reaction_event -> Yojson.Safe.json
val reaction_event_of_yojson : Yojson.Safe.json -> reaction_event Ppx_deriving_yojson_runtime.error_or
val reaction_event_of_yojson_exn : Yojson.Safe.json -> reaction_event
type t = {
count : int;
emoji : Disml.Emoji.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
\ No newline at end of file diff --git a/docs/disml/Disml__Rl/RouteMap/index.html b/docs/disml/Disml__Rl/RouteMap/index.html index 3970fb3..311a90a 100644 --- a/docs/disml/Disml__Rl/RouteMap/index.html +++ b/docs/disml/Disml__Rl/RouteMap/index.html @@ -1,2 +1,2 @@ -RouteMap (disml.Disml__Rl.RouteMap)

Module Disml__Rl.RouteMap

module Key : sig ... end
module Tree : sig ... end
type 'a t = (Key.t'aKey.comparator_witness) Core_kernel__.Map_intf.Map.t
val compare : ('a -> 'a -> Core_kernel__.Import.int) -> 'a t -> 'a t -> Core_kernel__.Import.int
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist : (Key.t * 'a) list -> [ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error : (Key.t * 'a) list -> 'a t Base__.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold : (Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce : (Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array : (Key.t * 'a) array -> 'a t Base__.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_increasing_iterator_unchecked : len:int -> f:(int -> Key.t * 'a) -> 'a t
val of_increasing_sequence : (Key.t * 'a) Base__.Sequence.t -> 'a t Base__.Or_error.t
val of_iteri : iteri:(f:(key:Key.t -> data:'v -> unit) -> unit) -> [ `Duplicate_key of Key.t | `Ok of 'v t ]
val of_tree : 'a Tree.t -> 'a t
val of_hashtbl_exn : (Key.t'a) Core_kernel__.Hashtbl.t -> 'a t
val gen : Key.t Core_kernel__.Quickcheck.Generator.t -> 'a Core_kernel__.Quickcheck.Generator.t -> 'a t Core_kernel__.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t Base__.Map_intf.Or_duplicate.t
val add_exn : 'a t -> key:Key.t -> data:'a -> 'a t
val set : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val remove_multi : 'a list t -> Key.t -> 'a list t
val find_multi : 'a list t -> Key.t -> 'a list
val change : 'a t -> Key.t -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> Key.t -> f:('a option -> 'a) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter_keys : 'a t -> f:(Key.t -> unit) -> unit
val iter : 'a t -> f:('a -> unit) -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 : 'a t -> 'b t -> f:(key:Key.t -> data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] -> unit) -> unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold : 'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right : 'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold2 : 'a t -> 'b t -> init:'c -> f:(key:Key.t -> data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] -> 'c -> 'c) -> 'c
val filter_keys : 'a t -> f:(Key.t -> bool) -> 'a t
val filter : 'a t -> f:('a -> bool) -> 'a t
val filteri : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val partition_mapi : 'a t -> f:(key:Key.t -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partition_map : 'a t -> f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : ?⁠key_order:[ `Decreasing | `Increasing ] -> 'a t -> (Key.t * 'a) list
val validate : name:(Key.t -> string) -> 'a Base__.Validate.check -> 'a t Base__.Validate.check
val merge : 'a t -> 'b t -> f:(key:Key.t -> [ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] -> 'c option) -> 'c t
val symmetric_diff : 'a t -> 'a t -> data_equal:('a -> 'a -> bool) -> (Key.t'a) Base__.Map_intf.Symmetric_diff_element.t Base__.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli : 'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi : 'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti : 'a t -> f:(key:Key.t -> data:'a -> bool) -> int
val split : 'a t -> Key.t -> 'a t * (Key.t * 'a) option * 'a t
val append : lower_part:'a t -> upper_part:'a t -> [ `Ok of 'a t | `Overlapping_key_ranges ]
val subrange : 'a t -> lower_bound:Key.t Base__.Maybe_bound.t -> upper_bound:Key.t Base__.Maybe_bound.t -> 'a t
val fold_range_inclusive : 'a t -> min:Key.t -> max:Key.t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist : 'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val closest_key : 'a t -> [ `Greater_or_equal_to | `Greater_than | `Less_or_equal_to | `Less_than ] -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val nth_exn : 'a t -> int -> Key.t * 'a
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence : ?⁠order:[ `Decreasing_key | `Increasing_key ] -> ?⁠keys_greater_or_equal_to:Key.t -> ?⁠keys_less_or_equal_to:Key.t -> 'a t -> (Key.t * 'a) Base__.Sequence.t
val obs : Key.t Core_kernel__.Quickcheck.Observer.t -> 'v Core_kernel__.Quickcheck.Observer.t -> 'v t Core_kernel__.Quickcheck.Observer.t
val shrinker : Key.t Core_kernel__.Quickcheck.Shrinker.t -> 'v Core_kernel__.Quickcheck.Shrinker.t -> 'v t Core_kernel__.Quickcheck.Shrinker.t
module Provide_of_sexp : functor (Key : sig ... end) -> sig ... end
module Provide_bin_io : functor (Key : sig ... end) -> sig ... end
module Provide_hash : functor (Key : sig ... end) -> sig ... end
val t_of_sexp : (Base__.Ppx_sexp_conv_lib.Sexp.t -> 'a) -> Base__.Ppx_sexp_conv_lib.Sexp.t -> 'a t
val sexp_of_t : ('a -> Base__.Ppx_sexp_conv_lib.Sexp.t) -> 'a t -> Base__.Ppx_sexp_conv_lib.Sexp.t
\ No newline at end of file +RouteMap (disml.Disml__Rl.RouteMap)

Module Disml__Rl.RouteMap

Type for mapping route -> rl.

module Key : sig ... end
module Tree : sig ... end
type 'a t = (Key.t'aKey.comparator_witness) Core_kernel__.Map_intf.Map.t
val compare : ('a -> 'a -> Core_kernel__.Import.int) -> 'a t -> 'a t -> Core_kernel__.Import.int
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist : (Key.t * 'a) list -> [ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error : (Key.t * 'a) list -> 'a t Base__.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold : (Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce : (Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array : (Key.t * 'a) array -> 'a t Base__.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_increasing_iterator_unchecked : len:int -> f:(int -> Key.t * 'a) -> 'a t
val of_increasing_sequence : (Key.t * 'a) Base__.Sequence.t -> 'a t Base__.Or_error.t
val of_iteri : iteri:(f:(key:Key.t -> data:'v -> unit) -> unit) -> [ `Duplicate_key of Key.t | `Ok of 'v t ]
val of_tree : 'a Tree.t -> 'a t
val of_hashtbl_exn : (Key.t'a) Core_kernel__.Hashtbl.t -> 'a t
val gen : Key.t Core_kernel__.Quickcheck.Generator.t -> 'a Core_kernel__.Quickcheck.Generator.t -> 'a t Core_kernel__.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t Base__.Map_intf.Or_duplicate.t
val add_exn : 'a t -> key:Key.t -> data:'a -> 'a t
val set : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val remove_multi : 'a list t -> Key.t -> 'a list t
val find_multi : 'a list t -> Key.t -> 'a list
val change : 'a t -> Key.t -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> Key.t -> f:('a option -> 'a) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter_keys : 'a t -> f:(Key.t -> unit) -> unit
val iter : 'a t -> f:('a -> unit) -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 : 'a t -> 'b t -> f:(key:Key.t -> data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] -> unit) -> unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold : 'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right : 'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold2 : 'a t -> 'b t -> init:'c -> f:(key:Key.t -> data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] -> 'c -> 'c) -> 'c
val filter_keys : 'a t -> f:(Key.t -> bool) -> 'a t
val filter : 'a t -> f:('a -> bool) -> 'a t
val filteri : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val partition_mapi : 'a t -> f:(key:Key.t -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partition_map : 'a t -> f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : ?⁠key_order:[ `Decreasing | `Increasing ] -> 'a t -> (Key.t * 'a) list
val validate : name:(Key.t -> string) -> 'a Base__.Validate.check -> 'a t Base__.Validate.check
val merge : 'a t -> 'b t -> f:(key:Key.t -> [ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] -> 'c option) -> 'c t
val symmetric_diff : 'a t -> 'a t -> data_equal:('a -> 'a -> bool) -> (Key.t'a) Base__.Map_intf.Symmetric_diff_element.t Base__.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli : 'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi : 'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti : 'a t -> f:(key:Key.t -> data:'a -> bool) -> int
val split : 'a t -> Key.t -> 'a t * (Key.t * 'a) option * 'a t
val append : lower_part:'a t -> upper_part:'a t -> [ `Ok of 'a t | `Overlapping_key_ranges ]
val subrange : 'a t -> lower_bound:Key.t Base__.Maybe_bound.t -> upper_bound:Key.t Base__.Maybe_bound.t -> 'a t
val fold_range_inclusive : 'a t -> min:Key.t -> max:Key.t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist : 'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val closest_key : 'a t -> [ `Greater_or_equal_to | `Greater_than | `Less_or_equal_to | `Less_than ] -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val nth_exn : 'a t -> int -> Key.t * 'a
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence : ?⁠order:[ `Decreasing_key | `Increasing_key ] -> ?⁠keys_greater_or_equal_to:Key.t -> ?⁠keys_less_or_equal_to:Key.t -> 'a t -> (Key.t * 'a) Base__.Sequence.t
val obs : Key.t Core_kernel__.Quickcheck.Observer.t -> 'v Core_kernel__.Quickcheck.Observer.t -> 'v t Core_kernel__.Quickcheck.Observer.t
val shrinker : Key.t Core_kernel__.Quickcheck.Shrinker.t -> 'v Core_kernel__.Quickcheck.Shrinker.t -> 'v t Core_kernel__.Quickcheck.Shrinker.t
module Provide_of_sexp : functor (Key : sig ... end) -> sig ... end
module Provide_bin_io : functor (Key : sig ... end) -> sig ... end
module Provide_hash : functor (Key : sig ... end) -> sig ... end
val t_of_sexp : (Base__.Ppx_sexp_conv_lib.Sexp.t -> 'a) -> Base__.Ppx_sexp_conv_lib.Sexp.t -> 'a t
val sexp_of_t : ('a -> Base__.Ppx_sexp_conv_lib.Sexp.t) -> 'a t -> Base__.Ppx_sexp_conv_lib.Sexp.t
\ No newline at end of file diff --git a/docs/disml/Disml__Rl/index.html b/docs/disml/Disml__Rl/index.html index 98046ce..6a192fb 100644 --- a/docs/disml/Disml__Rl/index.html +++ b/docs/disml/Disml__Rl/index.html @@ -1,2 +1,2 @@ -Disml__Rl (disml.Disml__Rl)

Module Disml__Rl

module RouteMap : module type of sig ... end
type rl = {
limit : int;
remaining : int;
reset : int;
}
type t = (rl, Core.read_write) Async.Mvar.t RouteMap.t
val rl_of_header : Cohttp.Header.t -> rl option
val default : rl
val empty : t
val update : 'a RouteMap.t -> string -> f:('a option -> 'a) -> 'a RouteMap.t
val find : 'a RouteMap.t -> string -> 'a option
val find_exn : 'a RouteMap.t -> string -> 'a
\ No newline at end of file +Disml__Rl (disml.Disml__Rl)

Module Disml__Rl

Internal ratelimit route mapping.

module RouteMap : module type of sig ... end

Type for mapping route -> rl.

type rl = {
limit : int;
remaining : int;
reset : int;
}

Type representing ratelimit information.

type t = (rl, Core.read_write) Async.Mvar.t RouteMap.t

Type representing the specific case of RouteMap.

val rl_of_header : Cohttp.Header.t -> rl option

Converts Cohttp header data into ratelimit information.

returns

Some of ratelimit information or None on bad headers

val default : rl

Default for type rl. Used for prepopulating routes.

val empty : t

Empty ratelimit route map.

val update : 'a RouteMap.t -> string -> f:('a option -> 'a) -> 'a RouteMap.t

Analogous to RouteMap.update.

val find : 'a RouteMap.t -> string -> 'a option

Analogous to RouteMap.find.

val find_exn : 'a RouteMap.t -> string -> 'a

Analogous to RouteMap.find_exn.

\ No newline at end of file diff --git a/docs/disml/Disml__Role/index.html b/docs/disml/Disml__Role/index.html index 1847366..3a02aac 100644 --- a/docs/disml/Disml__Role/index.html +++ b/docs/disml/Disml__Role/index.html @@ -1,2 +1,2 @@ -Disml__Role (disml.Disml__Role)

Module Disml__Role

include module type of Disml.Role_t
type role = {
id : Disml.Snowflake.t;
name : string;
colour : int;
hoist : bool;
position : int;
permissions : int;
managed : bool;
mentionable : bool;
}
val role_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> role
val sexp_of_role : role -> Ppx_sexp_conv_lib.Sexp.t
val role_to_yojson : role -> Yojson.Safe.json
val role_of_yojson : Yojson.Safe.json -> role Ppx_deriving_yojson_runtime.error_or
val _ : role -> Yojson.Safe.json
val _ : Yojson.Safe.json -> role Ppx_deriving_yojson_runtime.error_or
val role_of_yojson_exn : Yojson.Safe.json -> role
val _ : Yojson.Safe.json -> role
type role_update = {
role : role;
guild_id : Disml.Snowflake.t;
}
val role_update_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> role_update
val sexp_of_role_update : role_update -> Ppx_sexp_conv_lib.Sexp.t
val role_update_to_yojson : role_update -> Yojson.Safe.json
val role_update_of_yojson : Yojson.Safe.json -> role_update Ppx_deriving_yojson_runtime.error_or
val _ : role_update -> Yojson.Safe.json
val _ : Yojson.Safe.json -> role_update Ppx_deriving_yojson_runtime.error_or
val role_update_of_yojson_exn : Yojson.Safe.json -> role_update
val _ : Yojson.Safe.json -> role_update
type t = {
id : Disml.Snowflake.t;
name : string;
colour : int;
hoist : bool;
position : int;
permissions : int;
managed : bool;
mentionable : bool;
guild_id : Disml.Snowflake.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
val wrap : guild_id:Disml.Snowflake.t -> role -> t
val allow_mention : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val delete : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val disallow_mention : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val hoist : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val set_colour : colour:int -> t -> Yojson.Safe.json Async.Deferred.Or_error.t
val set_name : name:string -> t -> Yojson.Safe.json Async.Deferred.Or_error.t
val unhoist : t -> Yojson.Safe.json Async.Deferred.Or_error.t
\ No newline at end of file +Disml__Role (disml.Disml__Role)

Module Disml__Role

include module type of Disml.Role_t
type role = {
id : Disml.Snowflake.t;
name : string;
colour : int;
hoist : bool;
position : int;
permissions : int;
managed : bool;
mentionable : bool;
}
val role_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> role
val sexp_of_role : role -> Ppx_sexp_conv_lib.Sexp.t
val role_to_yojson : role -> Yojson.Safe.json
val role_of_yojson : Yojson.Safe.json -> role Ppx_deriving_yojson_runtime.error_or
val role_of_yojson_exn : Yojson.Safe.json -> role
type role_update = {
role : role;
guild_id : Disml.Snowflake.t;
}
val role_update_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> role_update
val sexp_of_role_update : role_update -> Ppx_sexp_conv_lib.Sexp.t
val role_update_to_yojson : role_update -> Yojson.Safe.json
val role_update_of_yojson : Yojson.Safe.json -> role_update Ppx_deriving_yojson_runtime.error_or
val role_update_of_yojson_exn : Yojson.Safe.json -> role_update
type t = {
id : Disml.Snowflake.t;
name : string;
colour : int;
hoist : bool;
position : int;
permissions : int;
managed : bool;
mentionable : bool;
guild_id : Disml.Snowflake.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val wrap : guild_id:Disml.Snowflake.t -> role -> t
val allow_mention : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val delete : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val disallow_mention : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val hoist : t -> Yojson.Safe.json Async.Deferred.Or_error.t
val set_colour : colour:int -> t -> Yojson.Safe.json Async.Deferred.Or_error.t
val set_name : name:string -> t -> Yojson.Safe.json Async.Deferred.Or_error.t
val unhoist : t -> Yojson.Safe.json Async.Deferred.Or_error.t
\ No newline at end of file diff --git a/docs/disml/Disml__Role_t/index.html b/docs/disml/Disml__Role_t/index.html index f9426d9..927e302 100644 --- a/docs/disml/Disml__Role_t/index.html +++ b/docs/disml/Disml__Role_t/index.html @@ -1,2 +1,2 @@ -Disml__Role_t (disml.Disml__Role_t)

Module Disml__Role_t

type role = {
id : Disml.Snowflake.t;
name : string;
colour : int;
hoist : bool;
position : int;
permissions : int;
managed : bool;
mentionable : bool;
}
val role_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> role
val sexp_of_role : role -> Ppx_sexp_conv_lib.Sexp.t
val role_to_yojson : role -> Yojson.Safe.json
val role_of_yojson : Yojson.Safe.json -> role Ppx_deriving_yojson_runtime.error_or
val _ : role -> Yojson.Safe.json
val _ : Yojson.Safe.json -> role Ppx_deriving_yojson_runtime.error_or
val role_of_yojson_exn : Yojson.Safe.json -> role
val _ : Yojson.Safe.json -> role
type role_update = {
role : role;
guild_id : Disml.Snowflake.t;
}
val role_update_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> role_update
val sexp_of_role_update : role_update -> Ppx_sexp_conv_lib.Sexp.t
val role_update_to_yojson : role_update -> Yojson.Safe.json
val role_update_of_yojson : Yojson.Safe.json -> role_update Ppx_deriving_yojson_runtime.error_or
val _ : role_update -> Yojson.Safe.json
val _ : Yojson.Safe.json -> role_update Ppx_deriving_yojson_runtime.error_or
val role_update_of_yojson_exn : Yojson.Safe.json -> role_update
val _ : Yojson.Safe.json -> role_update
type t = {
id : Disml.Snowflake.t;
name : string;
colour : int;
hoist : bool;
position : int;
permissions : int;
managed : bool;
mentionable : bool;
guild_id : Disml.Snowflake.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
val wrap : guild_id:Disml.Snowflake.t -> role -> t
\ No newline at end of file +Disml__Role_t (disml.Disml__Role_t)

Module Disml__Role_t

type role = {
id : Disml.Snowflake.t;
name : string;
colour : int;
hoist : bool;
position : int;
permissions : int;
managed : bool;
mentionable : bool;
}
val role_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> role
val sexp_of_role : role -> Ppx_sexp_conv_lib.Sexp.t
val role_to_yojson : role -> Yojson.Safe.json
val role_of_yojson : Yojson.Safe.json -> role Ppx_deriving_yojson_runtime.error_or
val role_of_yojson_exn : Yojson.Safe.json -> role
type role_update = {
role : role;
guild_id : Disml.Snowflake.t;
}
val role_update_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> role_update
val sexp_of_role_update : role_update -> Ppx_sexp_conv_lib.Sexp.t
val role_update_to_yojson : role_update -> Yojson.Safe.json
val role_update_of_yojson : Yojson.Safe.json -> role_update Ppx_deriving_yojson_runtime.error_or
val role_update_of_yojson_exn : Yojson.Safe.json -> role_update
type t = {
id : Disml.Snowflake.t;
name : string;
colour : int;
hoist : bool;
position : int;
permissions : int;
managed : bool;
mentionable : bool;
guild_id : Disml.Snowflake.t;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val wrap : guild_id:Disml.Snowflake.t -> role -> t
\ No newline at end of file diff --git a/docs/disml/Disml__Sharder/Shard/index.html b/docs/disml/Disml__Sharder/Shard/index.html index 506b6b9..e75a3f8 100644 --- a/docs/disml/Disml__Sharder/Shard/index.html +++ b/docs/disml/Disml__Sharder/Shard/index.html @@ -1,2 +1,2 @@ -Shard (disml.Disml__Sharder.Shard)

Module Disml__Sharder.Shard

type shard
type 'a t = {
mutable state : 'a;
}
val heartbeat : shard -> shard Async.Deferred.t
val set_status : status:Yojson.Safe.json -> shard -> shard Async.Deferred.t
val request_guild_members : ?⁠query:string -> ?⁠limit:int -> guild:Disml.Snowflake.t -> shard -> shard Async.Deferred.t
val create : url:string -> shards:(int * int) -> unit -> shard Async.Deferred.t
\ No newline at end of file +Shard (disml.Disml__Sharder.Shard)

Module Disml__Sharder.Shard

Module representing a single shard.

type shard = {
hb_interval : Core.Time.Span.t Async.Ivar.t;

Time span between heartbeats, wrapped in an Ivar.

seq : int;

Current sequence number

session : string option;

Session id, if one exists.

pipe : Websocket_async.Frame.t Async.Pipe.Reader.t * Websocket_async.Frame.t Async.Pipe.Writer.t;

Raw frame IO pipe used for websocket communications.

ready : unit Async.Ivar.t;

A simple Ivar indicating if the shard has received READY.

url : string;

The websocket URL in use.

id : int * int;

A tuple as expected by Discord. First element is the current shard index, second element is the total shard count.

}

Representation of the state of a shard.

Wrapper around an internal state, used to wrap shard.

type 'a t = {
mutable state : 'a;
}

Wrapper around an internal state, used to wrap shard.

val heartbeat : shard -> shard Async.Deferred.t

Send a heartbeat to Discord. This is handled automatically.

val set_status : status:Yojson.Safe.json -> shard -> shard Async.Deferred.t

Set the status of the shard.

val request_guild_members : ?⁠query:string -> ?⁠limit:int -> guild:Disml.Snowflake.t -> shard -> shard Async.Deferred.t

Request guild members for the shard's guild. Causes dispatch of multiple member chunk events.

val create : url:string -> shards:(int * int) -> unit -> shard Async.Deferred.t

Create a new shard

\ No newline at end of file diff --git a/docs/disml/Disml__Sharder/index.html b/docs/disml/Disml__Sharder/index.html index 5039516..69dfbe7 100644 --- a/docs/disml/Disml__Sharder/index.html +++ b/docs/disml/Disml__Sharder/index.html @@ -1,2 +1,2 @@ -Disml__Sharder (disml.Disml__Sharder)

Module Disml__Sharder

exception Invalid_Payload
exception Failure_to_Establish_Heartbeat
type t
val start : ?⁠count:int -> unit -> t Async.Deferred.t
module Shard : sig ... end
val set_status : status:Yojson.Safe.json -> t -> Shard.shard list Async.Deferred.t
val set_status_with : f:(Shard.shard -> Yojson.Safe.json) -> t -> Shard.shard list Async.Deferred.t
val request_guild_members : ?⁠query:string -> ?⁠limit:int -> guild:Disml.Snowflake.t -> t -> Shard.shard list Async.Deferred.t
\ No newline at end of file +Disml__Sharder (disml.Disml__Sharder)

Module Disml__Sharder

Internal sharding manager. Most of this is accessed through Client.

exception Invalid_Payload
exception Failure_to_Establish_Heartbeat
type t
val start : ?⁠count:int -> unit -> t Async.Deferred.t

Start the Sharder. This is called by Client.start.

module Shard : sig ... end

Module representing a single shard.

val set_status : status:Yojson.Safe.json -> t -> Shard.shard list Async.Deferred.t

Calls Shard.set_status for each shard registered with the sharder.

val set_status_with : f:(Shard.shard -> Yojson.Safe.json) -> t -> Shard.shard list Async.Deferred.t

Like set_status but takes a function with a shard as its parameter and json for its return.

val request_guild_members : ?⁠query:string -> ?⁠limit:int -> guild:Disml.Snowflake.t -> t -> Shard.shard list Async.Deferred.t

Calls Shard.request_guild_members for each shard registered with the sharder.

\ No newline at end of file diff --git a/docs/disml/Disml__Snowflake/index.html b/docs/disml/Disml__Snowflake/index.html index 6bd4886..ef6befe 100644 --- a/docs/disml/Disml__Snowflake/index.html +++ b/docs/disml/Disml__Snowflake/index.html @@ -1,2 +1,2 @@ -Disml__Snowflake (disml.Disml__Snowflake)

Module Disml__Snowflake

type t = Core.Int.t
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val of_yojson_exn : Yojson.Safe.json -> Core.Int.t
val of_yojson : Yojson.Safe.json -> (Core.Int.t, string) Core._result
val to_yojson : Core.Int.t -> Yojson.Safe.json
val timestamp : int -> int
val timestamp_iso : int -> string
\ No newline at end of file +Disml__Snowflake (disml.Disml__Snowflake)

Module Disml__Snowflake

type t = Core.Int.t
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val of_yojson_exn : Yojson.Safe.json -> t
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val to_yojson : t -> Yojson.Safe.json
val timestamp : t -> int
val timestamp_iso : t -> string
\ No newline at end of file diff --git a/docs/disml/Disml__User/index.html b/docs/disml/Disml__User/index.html index 77892ad..b88ff5e 100644 --- a/docs/disml/Disml__User/index.html +++ b/docs/disml/Disml__User/index.html @@ -1,2 +1,2 @@ -Disml__User (disml.Disml__User)

Module Disml__User

include module type of Disml.User_t
type partial_user = {
id : Disml.Snowflake.t;
}
val partial_user_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> partial_user
val sexp_of_partial_user : partial_user -> Ppx_sexp_conv_lib.Sexp.t
val partial_user_to_yojson : partial_user -> Yojson.Safe.json
val partial_user_of_yojson : Yojson.Safe.json -> partial_user Ppx_deriving_yojson_runtime.error_or
val _ : partial_user -> Yojson.Safe.json
val _ : Yojson.Safe.json -> partial_user Ppx_deriving_yojson_runtime.error_or
val partial_user_of_yojson_exn : Yojson.Safe.json -> partial_user
val _ : Yojson.Safe.json -> partial_user
type t = {
id : Disml.Snowflake.t;
username : string;
discriminator : string;
avatar : string option;
bot : bool;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
val tag : t -> string
val mention : t -> string
val default_avatar : t -> string
val face : t -> string
\ No newline at end of file +Disml__User (disml.Disml__User)

Module Disml__User

include module type of Disml.User_t
type partial_user = {
id : Disml.Snowflake.t;
}
val partial_user_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> partial_user
val sexp_of_partial_user : partial_user -> Ppx_sexp_conv_lib.Sexp.t
val partial_user_to_yojson : partial_user -> Yojson.Safe.json
val partial_user_of_yojson : Yojson.Safe.json -> partial_user Ppx_deriving_yojson_runtime.error_or
val partial_user_of_yojson_exn : Yojson.Safe.json -> partial_user
type t = {
id : Disml.Snowflake.t;
username : string;
discriminator : string;
avatar : string option;
bot : bool;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val tag : t -> string
val mention : t -> string
val default_avatar : t -> string
val face : t -> string
\ No newline at end of file diff --git a/docs/disml/Disml__User_t/index.html b/docs/disml/Disml__User_t/index.html index 958ed83..baecc2a 100644 --- a/docs/disml/Disml__User_t/index.html +++ b/docs/disml/Disml__User_t/index.html @@ -1,2 +1,2 @@ -Disml__User_t (disml.Disml__User_t)

Module Disml__User_t

type partial_user = {
id : Disml.Snowflake.t;
}
val partial_user_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> partial_user
val sexp_of_partial_user : partial_user -> Ppx_sexp_conv_lib.Sexp.t
val partial_user_to_yojson : partial_user -> Yojson.Safe.json
val partial_user_of_yojson : Yojson.Safe.json -> partial_user Ppx_deriving_yojson_runtime.error_or
val _ : partial_user -> Yojson.Safe.json
val _ : Yojson.Safe.json -> partial_user Ppx_deriving_yojson_runtime.error_or
val partial_user_of_yojson_exn : Yojson.Safe.json -> partial_user
val _ : Yojson.Safe.json -> partial_user
type t = {
id : Disml.Snowflake.t;
username : string;
discriminator : string;
avatar : string option;
bot : bool;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val _ : t -> Yojson.Safe.json
val _ : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
val _ : Yojson.Safe.json -> t
\ No newline at end of file +Disml__User_t (disml.Disml__User_t)

Module Disml__User_t

type partial_user = {
id : Disml.Snowflake.t;
}
val partial_user_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> partial_user
val sexp_of_partial_user : partial_user -> Ppx_sexp_conv_lib.Sexp.t
val partial_user_to_yojson : partial_user -> Yojson.Safe.json
val partial_user_of_yojson : Yojson.Safe.json -> partial_user Ppx_deriving_yojson_runtime.error_or
val partial_user_of_yojson_exn : Yojson.Safe.json -> partial_user
type t = {
id : Disml.Snowflake.t;
username : string;
discriminator : string;
avatar : string option;
bot : bool;
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> t Ppx_deriving_yojson_runtime.error_or
val of_yojson_exn : Yojson.Safe.json -> t
\ No newline at end of file diff --git a/lib/sharder.mli b/lib/sharder.mli index 554ed73..aa040f9 100644 --- a/lib/sharder.mli +++ b/lib/sharder.mli @@ -1,30 +1,49 @@ +(** Internal sharding manager. Most of this is accessed through {!Client}. *) + +open Core open Async +open Websocket_async exception Invalid_Payload exception Failure_to_Establish_Heartbeat type t +(** Start the Sharder. This is called by {!Client.start}. *) val start : ?count:int -> unit -> t Deferred.t +(** Module representing a single shard. *) module Shard : sig - type shard + (** Representation of the state of a shard. *) + type shard = { + hb_interval: Time.Span.t Ivar.t; (** Time span between heartbeats, wrapped in an Ivar. *) + seq: int; (** Current sequence number *) + session: string option; (** Session id, if one exists. *) + pipe: Frame.t Pipe.Reader.t * Frame.t Pipe.Writer.t; (** Raw frame IO pipe used for websocket communications. *) + ready: unit Ivar.t; (** A simple Ivar indicating if the shard has received READY. *) + url: string; (** The websocket URL in use. *) + id: int * int; (** A tuple as expected by Discord. First element is the current shard index, second element is the total shard count. *) + } + (** Wrapper around an internal state, used to wrap {!shard}. *) type 'a t = { mutable state: 'a; } + (** Send a heartbeat to Discord. This is handled automatically. *) val heartbeat : shard -> shard Deferred.t + (** Set the status of the shard. *) val set_status : status:Yojson.Safe.json -> shard -> shard Deferred.t + (** Request guild members for the shard's guild. Causes dispatch of multiple {{!Dispatch.members_chunk}member chunk} events. *) val request_guild_members : ?query:string -> ?limit:int -> @@ -32,6 +51,7 @@ module Shard : sig shard -> shard Deferred.t + (** Create a new shard *) val create : url:string -> shards:int * int -> @@ -39,16 +59,19 @@ module Shard : sig shard Deferred.t end +(** Calls {!Shard.set_status} for each shard registered with the sharder. *) val set_status : status:Yojson.Safe.json -> t -> Shard.shard list Deferred.t +(** Like {!set_status} but takes a function with a {{!Shard.shard}shard} as its parameter and {{!Yojson.Safe.json}json} for its return. *) val set_status_with : f:(Shard.shard -> Yojson.Safe.json) -> t -> Shard.shard list Deferred.t +(** Calls {!Shard.request_guild_members} for each shard registered with the sharder. *) val request_guild_members : ?query:string -> ?limit:int -> -- cgit v1.2.3