From bbc615150c2b9bd876ba6706d7ecd1951d82adec Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Sat, 2 Jul 2022 22:00:50 +1000 Subject: [PATCH] show how long a user was timed out for in logs --- slowcord/src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/slowcord/src/index.ts b/slowcord/src/index.ts index 05a1433c..f741d355 100644 --- a/slowcord/src/index.ts +++ b/slowcord/src/index.ts @@ -91,6 +91,7 @@ app.use((req, res, next) => { } else if (rateLimits[ip] > Date.now()) { rateLimits[ip] += allowRequestsEveryMs; + console.log(`user ${ip} was timed out for ${(rateLimits[ip] - Date.now()) / 1000}s`); return res.sendStatus(429); } else {