aboutsummaryrefslogtreecommitdiff
path: root/lib/client.ml
blob: d1778e7fa144e11a6fbec0ca5e6f7a7b66872238 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
open Async
include Dispatch

type t = {
    sharder: Sharder.t;
}

let start ?count ?compress ?(large=250) token =
    Client_options.token := token;
    Sharder.start ?count ?compress ~large_threshold:large ()
    >>| fun sharder ->
    { sharder; }

let set_status ~status client =
    Sharder.set_status ~status client.sharder

let set_status_with ~f client =
    Sharder.set_status_with ~f client.sharder

let request_guild_members ~guild ?query ?limit client =
    let `Guild_id guild = guild in
    Sharder.request_guild_members ~guild ?query ?limit client.sharder