Fix waiting for rate limiting

This commit is contained in:
SeanOMik 2020-06-18 15:31:38 -05:00
parent 195dcff3ed
commit 82147ce491
No known key found for this signature in database
GPG Key ID: FA4D55AC05268A88
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ proc waitForRateLimits*(objectID: snowflake, bucketType: RateLimitBucketType) =
if (millisecondTime > 0): if (millisecondTime > 0):
echo fmt("Rate limit wait time: {millisecondTime} miliseconds") echo fmt("Rate limit wait time: {millisecondTime} miliseconds")
discard sleepAsync(millisecondTime) waitFor sleepAsync(millisecondTime)
proc sendRequest*(endpoint: string, httpMethod: HttpMethod, headers: HttpHeaders, objectID: snowflake = 0, proc sendRequest*(endpoint: string, httpMethod: HttpMethod, headers: HttpHeaders, objectID: snowflake = 0,
bucketType: RateLimitBucketType = global, jsonBody: JsonNode = nil): JsonNode = bucketType: RateLimitBucketType = global, jsonBody: JsonNode = nil): JsonNode =