mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 18:13:29 +01:00
feature: allow sweeping of inactive request buckets
This commit is contained in:
@@ -26,6 +26,13 @@ class RequestHandler {
|
||||
this.handle();
|
||||
}
|
||||
|
||||
get _inactive() {
|
||||
return this.queue.length === 0 &&
|
||||
!this.limited &&
|
||||
Date.now() > this.resetTime &&
|
||||
(typeof this.busy === 'undefined' || this.busy === false);
|
||||
}
|
||||
|
||||
execute(item) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const finish = timeout => {
|
||||
|
||||
Reference in New Issue
Block a user