From 82147ce491203ac0b1e06c9ad138c798a3304610 Mon Sep 17 00:00:00 2001 From: SeanOMik Date: Thu, 18 Jun 2020 15:31:38 -0500 Subject: [PATCH] Fix waiting for rate limiting --- src/nimcordutils.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nimcordutils.nim b/src/nimcordutils.nim index 638a20d..ddfb32d 100644 --- a/src/nimcordutils.nim +++ b/src/nimcordutils.nim @@ -107,7 +107,7 @@ proc waitForRateLimits*(objectID: snowflake, bucketType: RateLimitBucketType) = if (millisecondTime > 0): 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, bucketType: RateLimitBucketType = global, jsonBody: JsonNode = nil): JsonNode =