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

type t = {
    sharder: Sharder.t;
}

let start ?count ?compress ?(large=250) token =
    Client_options.token := token;
    Client_options.large_threshold := large;
    Sharder.start ?count ?compress ()
    >>| 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 =
    Sharder.request_guild_members ~guild ?query ?limit client.sharder