aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMishio595 <[email protected]>2018-11-25 18:51:44 -0700
committerMishio595 <[email protected]>2018-11-25 18:51:44 -0700
commitad8a13b186683cb1e6c5ef405df503f58b751ffa (patch)
tree26b87993cdabb16bf0582423e0629633e8feb6c0 /bin
parentNaming consistency (diff)
downloaddisml-ad8a13b186683cb1e6c5ef405df503f58b751ffa.tar.xz
disml-ad8a13b186683cb1e6c5ef405df503f58b751ffa.zip
convert to client from client_ez
Diffstat (limited to 'bin')
-rw-r--r--bin/bot.ml12
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/bot.ml b/bin/bot.ml
index 54cf060..636f768 100644
--- a/bin/bot.ml
+++ b/bin/bot.ml
@@ -2,7 +2,7 @@ open Async
open Core
open Disml
-let rec ev_loop read =
+(* let rec ev_loop read =
Pipe.read read >>= fun frame ->
match frame with
| `Eof -> return ()
@@ -35,22 +35,22 @@ let rec ev_loop read =
end
| _ -> return ()
end
- >>= fun _ -> ev_loop read
+ >>= fun _ -> ev_loop read *)
let main () =
let token = match Sys.getenv "DISCORD_TOKEN" with
| Some s -> s
| None -> failwith "No token"
in
- let (r,w) = Pipe.create () in
- let client = Client.make ~handler:w token in
- ev_loop r >>> ignore;
+ let (_r,w) = Pipe.create () in
+ let client = Client.create ~handler:w token in
+ (* ev_loop r >>> ignore; *)
Client.start client
>>> fun client ->
Clock.every
(Time.Span.create ~sec:60 ())
(fun () ->
- Client.set_status_with client (fun shard -> `String ("Current seq: " ^ (Int.to_string shard.seq)))
+ Client.set_status_with ~f:(fun shard -> `String ("Current seq: " ^ (Int.to_string shard.seq))) client
|> ignore)
let _ =