Skip to content

Commit cf553ce

Browse files
bsian03abalabahaha
authored andcommitted
fix(rest): add separate ratelimit for messages <=10s old (#1267)
1 parent bc8245c commit cf553ce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/rest/RequestHandler.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,8 @@ class RequestHandler {
402402
const createdAt = Base.getCreatedAt(messageID);
403403
if(Date.now() - this.latencyRef.latency - createdAt >= 1000 * 60 * 60 * 24 * 14) {
404404
method += "_OLD";
405+
} else if(Date.now() - this.latencyRef.latency - createdAt <= 1000 * 10) {
406+
method += "_NEW";
405407
}
406408
route = method + route;
407409
}

0 commit comments

Comments
 (0)