blob: a1bbf004fc47b9c5ddb6ad81d66dadf00f5344b3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
open Async
open Core
open Disml
let main () =
let token = match Sys.getenv "DISCORD_TOKEN" with
| Some t -> t
| None -> failwith "No token in env"
in
Client.create token;
Client.start ()
>>> fun client ->
Clock.every
(Time.Span.create ~sec:60 ())
(fun () ->
print_endline "Setting status";
Client.set_status ~status:(`String "Hello!") client
>>> ignore)
let _ =
Scheduler.go_main ~main ()
|