diff --git a/lib/Handler.js b/lib/Handler.js index dd561a46..e650f645 100644 --- a/lib/Handler.js +++ b/lib/Handler.js @@ -16,8 +16,8 @@ const Ratelimiter = require('./Ratelimiter'); * * @prop {String} key API key * @prop {Number} numRes Amount of responses returned from the API. - * @prop {?Number} shortRemaining Amount of requests left during the "short" period before you get ratelimited. Will be null before the first request. - * @prop {?Number} longRemaining Amount of requests left during the "long" period before you get ratelimited. Will be null before the first request. + * @prop {Ratelimiter} shortLimiter Ratelimiter object that takes care of the short period, usually 30 seconds. + * @prop {Ratelimiter} longLimiter Ratelimiter object that takes care of the long period, usually 24 hours. */ class Handler { /** @@ -34,7 +34,7 @@ class Handler { this.numRes = options.numRes != null ? options.numRes : 5; this.getRating = options.getRating || false; this.shortLimiter = new Ratelimiter(20, PERIODS.SHORT); // 20 uses every 30 seconds - this.longLimiter = new Ratelimiter(300, PERIODS.SHORT); // 300 uses every 24 hours + this.longLimiter = new Ratelimiter(300, PERIODS.LONG); // 300 uses every 24 hours } /**