Skip to content

Commit

Permalink
less discord messages
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyBurger committed Dec 13, 2023
1 parent 9aa6013 commit 6d53806
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/fetch-stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
}

Expand Down

0 comments on commit 6d53806

Please sign in to comment.