From 6d53806e9ce5e557ba049da76547694d370a94c2 Mon Sep 17 00:00:00 2001 From: Jonny Burger Date: Wed, 13 Dec 2023 10:38:14 +0100 Subject: [PATCH] less discord messages --- src/server/fetch-stats.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/fetch-stats.ts b/src/server/fetch-stats.ts index 4f16668c..ab4c2d10 100644 --- a/src/server/fetch-stats.ts +++ b/src/server/fetch-stats.ts @@ -23,7 +23,7 @@ export const executeGitHubGraphQlQuery = async ({ }); const rateLimit = res.headers.get("x-ratelimit-remaining"); - if (Math.random() < 0.1) { + if (Number(rateLimit) < 1000) { sendDiscordMessage(`Rate limit remaining: ${rateLimit}`); }