Emergency bug fix

Stopped the client from assuming all errors were 429 errors
This commit is contained in:
Amish Shah
2015-12-22 00:47:40 +00:00
committed by abalabahaha
parent d8ac7e97a1
commit d93990822e
3 changed files with 1 additions and 3 deletions

View File

@@ -132,7 +132,6 @@ var InternalClient = (function () {
return new Promise(function (resolve, reject) {
ret.end(function (error, data) {
if (error) {
error.response.error.status = 429;
if (!_this.client.options.rate_limit_as_error && error.response && error.response.error && error.response.error.status && error.response.error.status === 429) {
if (data.headers["retry-after"] || data.headers["Retry-After"]) {

View File

@@ -1,6 +1,6 @@
{
"name": "discord.js",
"version": "5.1.0",
"version": "5.2.0",
"description": "A way to interface with the Discord API",
"main": "./entrypoint.js",
"scripts": {

View File

@@ -65,7 +65,6 @@ export default class InternalClient {
return new Promise((resolve, reject) => {
ret.end((error, data) => {
if (error) {
error.response.error.status = 429;
if (!this.client.options.rate_limit_as_error &&
error.response &&
error.response.error &&