This commit is contained in:
Skillz4Killz
2021-09-30 08:06:42 +00:00
committed by GitHub
parent f44e6c7b43
commit a9e5ce01c9
11 changed files with 180 additions and 135 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
import { rest } from "./rest.ts";
import { RestManager } from "../bot.ts";
/** Check the rate limits for a url or a bucket. */
export function checkRateLimits(url: string) {
export function checkRateLimits(rest: RestManager, url: string) {
const ratelimited = rest.ratelimitedPaths.get(url);
const global = rest.ratelimitedPaths.get("global");
const now = Date.now();