mirror of
https://github.com/danbulant/discord.js
synced 2026-06-20 23:21:04 +00:00
Emergency bug fix
Stopped the client from assuming all errors were 429 errors
This commit is contained in:
parent
d8ac7e97a1
commit
d93990822e
3 changed files with 1 additions and 3 deletions
|
|
@ -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"]) {
|
||||
|
|
|
|||
|
|
@ -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": {
|
||||
|
|
|
|||
|
|
@ -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 &&
|
||||
|
|
|
|||
Loading…
Reference in a new issue