Skip to content

Commit

Permalink
Pass parsed token to Ratelimiter::new() (#1848)
Browse files Browse the repository at this point in the history
Fixes a regression caused by #1840 where `Ratelimiter::new()` receives
the original token instead of the one prefixed with `Bot`.
  • Loading branch information
vaporoxx authored and arqunis committed Apr 18, 2022
1 parent f8bc937 commit f4f310d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/http/client.rs
Expand Up @@ -220,12 +220,14 @@ impl Http {
let client = builder.build().expect("Cannot build reqwest::Client");
let client2 = client.clone();

let token = parse_token(token);

Http {
client,
ratelimiter: Ratelimiter::new(client2, token.to_string()),
ratelimiter_disabled: false,
proxy: None,
token: parse_token(token),
token,
application_id: AtomicU64::new(0),
}
}
Expand Down

0 comments on commit f4f310d

Please sign in to comment.