comply to the latest rate limit stuff (hammerandchisel/discord-api-docs#108)

This commit is contained in:
Amish Shah
2016-09-24 18:18:49 +01:00
parent bd1449bc5a
commit aef0b83c34
3 changed files with 15 additions and 8 deletions

View File

@@ -39,12 +39,12 @@ class RESTManager {
makeRequest(method, url, auth, data, file) {
const apiRequest = new APIRequest(this, method, url, auth, data, file);
if (!this.handlers[apiRequest.getEndpoint()]) {
if (!this.handlers[apiRequest.route]) {
const RequestHandlerType = this.getRequestHandler();
this.handlers[apiRequest.getEndpoint()] = new RequestHandlerType(this, apiRequest.getEndpoint());
this.handlers[apiRequest.route] = new RequestHandlerType(this, apiRequest.route);
}
return this.push(this.handlers[apiRequest.getEndpoint()], apiRequest);
return this.push(this.handlers[apiRequest.route], apiRequest);
}
}