mirror of
https://github.com/danbulant/discord.js
synced 2026-07-06 11:40:41 +00:00
Webpack build for branch 11.3-dev: 8700e965c5
This commit is contained in:
parent
1f7a7a46cd
commit
f7d1bb0781
2 changed files with 12 additions and 4 deletions
|
|
@ -12934,7 +12934,7 @@ module.exports = GroupDMChannel;
|
||||||
* @extends Error
|
* @extends Error
|
||||||
*/
|
*/
|
||||||
class DiscordAPIError extends Error {
|
class DiscordAPIError extends Error {
|
||||||
constructor(path, error) {
|
constructor(path, error, method) {
|
||||||
super();
|
super();
|
||||||
const flattened = this.constructor.flattenErrors(error.errors || error).join('\n');
|
const flattened = this.constructor.flattenErrors(error.errors || error).join('\n');
|
||||||
this.name = 'DiscordAPIError';
|
this.name = 'DiscordAPIError';
|
||||||
|
|
@ -12951,6 +12951,12 @@ class DiscordAPIError extends Error {
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
this.code = error.code;
|
this.code = error.code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The HTTP method used for the request
|
||||||
|
* @type {string}
|
||||||
|
*/
|
||||||
|
this.method = method;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -18770,7 +18776,8 @@ class SequentialRequestHandler extends RequestHandler {
|
||||||
this.queue.unshift(item);
|
this.queue.unshift(item);
|
||||||
this.restManager.client.setTimeout(resolve, 1e3 + this.restManager.client.options.restTimeOffset);
|
this.restManager.client.setTimeout(resolve, 1e3 + this.restManager.client.options.restTimeOffset);
|
||||||
} else {
|
} else {
|
||||||
item.reject(err.status >= 400 && err.status < 500 ? new DiscordAPIError(res.request.path, res.body) : err);
|
item.reject(err.status >= 400 && err.status < 500 ?
|
||||||
|
new DiscordAPIError(res.request.path, res.body, res.request.method) : err);
|
||||||
resolve(err);
|
resolve(err);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -18856,7 +18863,8 @@ class BurstRequestHandler extends RequestHandler {
|
||||||
this.resetTimeout = null;
|
this.resetTimeout = null;
|
||||||
}, 1e3 + this.client.options.restTimeOffset);
|
}, 1e3 + this.client.options.restTimeOffset);
|
||||||
} else {
|
} else {
|
||||||
item.reject(err.status >= 400 && err.status < 500 ? new DiscordAPIError(res.request.path, res.body) : err);
|
item.reject(err.status >= 400 && err.status < 500 ?
|
||||||
|
new DiscordAPIError(res.request.path, res.body, res.request.method) : err);
|
||||||
this.handle();
|
this.handle();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
2
discord.11.3-dev.min.js
vendored
2
discord.11.3-dev.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue