diff options
| author | Mishio595 <[email protected]> | 2018-11-25 18:51:44 -0700 |
|---|---|---|
| committer | Mishio595 <[email protected]> | 2018-11-25 18:51:44 -0700 |
| commit | ad8a13b186683cb1e6c5ef405df503f58b751ffa (patch) | |
| tree | 26b87993cdabb16bf0582423e0629633e8feb6c0 /bin | |
| parent | Naming consistency (diff) | |
| download | disml-ad8a13b186683cb1e6c5ef405df503f58b751ffa.tar.xz disml-ad8a13b186683cb1e6c5ef405df503f58b751ffa.zip | |
convert to client from client_ez
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/bot.ml | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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 _ = |