aboutsummaryrefslogtreecommitdiff
path: root/bin/bot.ml
diff options
context:
space:
mode:
authorAdelyn Breelove <[email protected]>2019-01-17 09:47:39 -0700
committerAdelyn Breelove <[email protected]>2019-01-17 09:47:39 -0700
commit8760c74b63eb44acad13829ef41b2e705f031ecb (patch)
tree90240eaaafc8f033c707fa00fdb3837ba485c0b9 /bin/bot.ml
parentMember methods are here (diff)
parentnew event dispatching (diff)
downloaddisml-8760c74b63eb44acad13829ef41b2e705f031ecb.tar.xz
disml-8760c74b63eb44acad13829ef41b2e705f031ecb.zip
Resolve non-ff merge
Diffstat (limited to 'bin/bot.ml')
-rw-r--r--bin/bot.ml18
1 files changed, 6 insertions, 12 deletions
diff --git a/bin/bot.ml b/bin/bot.ml
index 7d7f714..3608f85 100644
--- a/bin/bot.ml
+++ b/bin/bot.ml
@@ -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 ()