From a42c8cabea8e0d5ea23c3a062b6ae308afd62d2f Mon Sep 17 00:00:00 2001 From: Adelyn Breedlove Date: Fri, 7 Jun 2019 21:24:23 -0600 Subject: Relocate token prefixing --- lib/client.ml | 2 +- lib/http/http.ml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/client.ml b/lib/client.ml index 50966e7..bf27039 100644 --- a/lib/client.ml +++ b/lib/client.ml @@ -6,7 +6,7 @@ type t = } let start ?count ?compress ?(large=250) token = - Client_options.token := token; + Client_options.token := "Bot " ^ token; Sharder.start ?count ?compress ~large_threshold:large () >|= fun sharder -> { sharder; } diff --git a/lib/http/http.ml b/lib/http/http.ml index c99159f..61829cf 100644 --- a/lib/http/http.ml +++ b/lib/http/http.ml @@ -20,7 +20,7 @@ module Base = struct let h = Header.init () in Header.add_list h [ "User-Agent", "DiscordBot (https://gitlab.com/Mishio595/disml, v0.2.3)" - ; "Authorization", ("Bot " ^ !Client_options.token) + ; "Authorization", !Client_options.token ; "Content-Type", "application/json" ; "Connection", "keep-alive" ] -- cgit v1.2.3