diff options
Diffstat (limited to 'bin/bot.ml')
| -rw-r--r-- | bin/bot.ml | 18 |
1 files changed, 6 insertions, 12 deletions
@@ -1,21 +1,15 @@ open Async open Core +open Disml -module Client = Disml.Client.Make(struct +let main () = let token = match Sys.getenv "DISCORD_TOKEN" with | Some t -> t | None -> failwith "No token in env" -end)(Handler) - -let main () = - Client.start () - >>> fun client -> - Clock.every - (Time.Span.create ~sec:60 ()) - (fun () -> - print_endline "Setting status"; - Client.set_status ~status:(`String "Hello!") client - >>> ignore) + in + Client.start token + >>> ignore let _ = + Client.message_create := (fun msg -> print_endline msg.content); Scheduler.go_main ~main () |