diff options
| author | Adelyn Breedlove <[email protected]> | 2019-01-28 10:31:51 -0700 |
|---|---|---|
| committer | Adelyn Breedlove <[email protected]> | 2019-01-28 10:31:51 -0700 |
| commit | 8662e92987c437f59d09896a247ec2b5d82c4528 (patch) | |
| tree | f004cc14598351d4ad6b19d8e993d2f629c5e738 /lib/client.mli | |
| parent | Add more docs (diff) | |
| download | disml-8662e92987c437f59d09896a247ec2b5d82c4528.tar.xz disml-8662e92987c437f59d09896a247ec2b5d82c4528.zip | |
Publish docs updates
Diffstat (limited to 'lib/client.mli')
| -rw-r--r-- | lib/client.mli | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/lib/client.mli b/lib/client.mli index 3e79a39..a05810b 100644 --- a/lib/client.mli +++ b/lib/client.mli @@ -1,37 +1,37 @@ -open Async - -include module type of Client_options -include module type of Dispatch - -(** Type of the Client, it isn't recommended to access the fields directly. *) -type t = { - sharder: Sharder.t; -} - -(** Start the Client. This begins shard connections to Discord and event handlers should be registered prior to calling this. - {3 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 () - ]} - @param ?count Optional amount of shards to launch. Defaults to autosharding - @param string The token used for authentication - @return A deferred client object -*) -val start : ?count:int -> string -> t Deferred.t - -(** Same as {!Sharder.set_status} where [client.sharder] is passed. *) -val set_status : status:Yojson.Safe.json -> t -> Sharder.Shard.shard list Deferred.t - -(** Same as {!Sharder.set_status_with} where [client.sharder] is passed. *) -val set_status_with : f:(Sharder.Shard.shard -> Yojson.Safe.json) -> t -> Sharder.Shard.shard list Deferred.t - -(** Same as {!Sharder.request_guild_members} where [client.sharder] is passed. *) +open Async
+
+include module type of Client_options
+include module type of Dispatch
+
+(** Type of the Client, it isn't recommended to access the fields directly. *)
+type t = {
+ sharder: Sharder.t;
+}
+
+(** Start the Client. This begins shard connections to Discord and event handlers should be registered prior to calling this.
+ {3 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 ()
+ ]}
+ @param ?count Optional amount of shards to launch. Defaults to autosharding
+ @param string The token used for authentication
+ @return A deferred client object
+*)
+val start : ?count:int -> string -> t Deferred.t
+
+(** Same as {!Sharder.set_status} where [client.sharder] is passed. *)
+val set_status : status:Yojson.Safe.json -> t -> Sharder.Shard.shard list Deferred.t
+
+(** Same as {!Sharder.set_status_with} where [client.sharder] is passed. *)
+val set_status_with : f:(Sharder.Shard.shard -> Yojson.Safe.json) -> t -> Sharder.Shard.shard list Deferred.t
+
+(** Same as {!Sharder.request_guild_members} where [client.sharder] is passed. *)
val request_guild_members : guild:Snowflake.t -> ?query:string -> ?limit:int -> t -> Sharder.Shard.shard list Deferred.t
\ No newline at end of file |