feat(DiscordAPIErrror): Support Captcha solve service
This commit is contained in:
parent
43599b376e
commit
9af5d8954a
@ -25,7 +25,7 @@ class DiscordAPIError extends Error {
|
||||
|
||||
/**
|
||||
* HTTP error code returned by Discord
|
||||
* @type {number}
|
||||
* @type {number | string}
|
||||
*/
|
||||
this.code = error.code;
|
||||
|
||||
@ -35,6 +35,19 @@ class DiscordAPIError extends Error {
|
||||
*/
|
||||
this.httpStatus = status;
|
||||
|
||||
/**
|
||||
* @typedef {Object} Captcha
|
||||
* @property {Array<string>} captcha_key ['captcha-required']
|
||||
* @property {string} captcha_sitekey Captcha code ???
|
||||
* @property {string} captcha_service hcaptcha
|
||||
*/
|
||||
|
||||
/**
|
||||
* Captcha response data if the request requires a captcha
|
||||
* @type {Captcha | null}
|
||||
*/
|
||||
this.captcha = error?.captcha_service ? error : null;
|
||||
|
||||
/**
|
||||
* The data associated with the request that caused this error
|
||||
* @type {HTTPErrorData}
|
||||
|
Loading…
Reference in New Issue
Block a user