mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Update webhook rate limit code
This commit is contained in:
parent
ab8382dffe
commit
02e2c9314b
1 changed files with 5 additions and 0 deletions
|
|
@ -37,6 +37,11 @@ namespace PluralKit.Bot
|
|||
if (!info.hasResetTimeExpired)
|
||||
info.remaining = info.maxLimit;
|
||||
info.hasResetTimeExpired = true;
|
||||
|
||||
// We can hit this multiple times if many requests are in flight before a real one gets "back", so we still
|
||||
// decrement the remaining request count, this basically "blacklists" the channel given continuous spam until *one* of the requests come back with new rate limit headers
|
||||
info.remaining--;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue