mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 19:28:17 +00:00
feat: add rateLimit event (#447)
* fix(controllers): change return value of INTERACTION_CREATE event
* feat: add rateLimit event
Closes https://github.com/discordeno/discordeno/issues/349
* Revert "fix(controllers): change return value of INTERACTION_CREATE event"
This reverts commit 9bc52d2ebf.
* https://open.spotify.com/track/6fxVffaTuwjgEk5h9QyRjy
This commit is contained in:
@@ -423,5 +423,16 @@ function processHeaders(url: string, headers: Headers) {
|
||||
}
|
||||
}
|
||||
|
||||
if (ratelimited) {
|
||||
eventHandlers.rateLimit?.({
|
||||
remaining,
|
||||
bucketID,
|
||||
global,
|
||||
resetTimestamp,
|
||||
retryAfter,
|
||||
url,
|
||||
});
|
||||
}
|
||||
|
||||
return ratelimited ? bucketID : undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user