From e8b5cbef7b984c527675a4df8fe2c7b4d841b13c Mon Sep 17 00:00:00 2001 From: Zed Date: Sun, 20 Aug 2023 12:31:08 +0200 Subject: [PATCH] Add missing limitedAt assignment --- src/apiutils.nim | 1 + 1 file changed, 1 insertion(+) diff --git a/src/apiutils.nim b/src/apiutils.nim index 54e6777..6e333e7 100644 --- a/src/apiutils.nim +++ b/src/apiutils.nim @@ -137,6 +137,7 @@ proc fetch*(url: Uri; api: Api): Future[JsonNode] {.async.} = raise rateLimitError() elif errors in {rateLimited}: account.apis[api].limited = true + account.apis[api].limitedAt = epochTime().int echo "rate limited, api: ", $api, ", reqs left: ", account.apis[api].remaining, ", id: ", account.id proc fetchRaw*(url: Uri; api: Api): Future[string] {.async.} =