aboutsummaryrefslogtreecommitdiff
path: root/bin/bot.ml
diff options
context:
space:
mode:
authorMishio595 <[email protected]>2018-11-13 18:33:29 -0700
committerMishio595 <[email protected]>2018-11-13 18:33:29 -0700
commit658c8264f318d3bece4362656d39abdce306bfe3 (patch)
tree05736fc588588b259f0a316630069011a96b5a58 /bin/bot.ml
parentCompleted multi-sharding (diff)
downloaddisml-658c8264f318d3bece4362656d39abdce306bfe3.tar.xz
disml-658c8264f318d3bece4362656d39abdce306bfe3.zip
A few more sharding improvements
Diffstat (limited to 'bin/bot.ml')
-rw-r--r--bin/bot.ml9
1 files changed, 6 insertions, 3 deletions
diff --git a/bin/bot.ml b/bin/bot.ml
index 962948e..e976ce2 100644
--- a/bin/bot.ml
+++ b/bin/bot.ml
@@ -3,15 +3,18 @@ open Animus
let main sharder =
Lwt_engine.on_timer 60.0 true begin
- fun _ev -> Sharder.set_status sharder @@ `String "Testing..."
+ fun _ev -> Sharder.set_status_with sharder @@ begin
+ fun shard ->
+ `String ("Current seq: " ^ string_of_int shard.seq)
+ end
>|= (fun _ -> print_endline "Status set!")
|> ignore;
end
let _ =
- Animus.Sharder.start ~count:2 @@ Sys.getenv "DISCORD_TOKEN"
+ Animus.Sharder.start @@ Sys.getenv "DISCORD_TOKEN"
>>= (fun sharder ->
main sharder
|> ignore;
- Lwt_main.run sharder.promise)
+ sharder.promise)
|> Lwt_main.run \ No newline at end of file