feat(Options): captchaRetryLimit
This commit is contained in:
parent
7f5df8fddb
commit
705d03844d
@ -1041,6 +1041,9 @@ class Client extends BaseClient {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (typeof options.captchaRetryLimit !== 'number' || isNaN(options.captchaRetryLimit)) {
|
||||||
|
throw new TypeError('CLIENT_INVALID_OPTION', 'captchaRetryLimit', 'a number');
|
||||||
|
}
|
||||||
if (options && typeof options.captchaSolver !== 'function') {
|
if (options && typeof options.captchaSolver !== 'function') {
|
||||||
throw new TypeError('CLIENT_INVALID_OPTION', 'captchaSolver', 'a function');
|
throw new TypeError('CLIENT_INVALID_OPTION', 'captchaSolver', 'a function');
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,7 @@ const { defaultUA } = require('../util/Constants');
|
|||||||
* @property {boolean} [patchVoice=false] Automatically patch @discordjs/voice module (support for call)
|
* @property {boolean} [patchVoice=false] Automatically patch @discordjs/voice module (support for call)
|
||||||
* @property {string} [captchaService=null] Captcha service to use for solving captcha {@link captchaServices}
|
* @property {string} [captchaService=null] Captcha service to use for solving captcha {@link captchaServices}
|
||||||
* @property {string} [captchaKey=null] Captcha service key
|
* @property {string} [captchaKey=null] Captcha service key
|
||||||
|
* @property {string} [captchaRetryLimit=3] Captcha retry limit
|
||||||
* @property {string} [password=null] Your Discord account password
|
* @property {string} [password=null] Your Discord account password
|
||||||
* @property {boolean} [usingNewAttachmentAPI=true] Use new attachment API
|
* @property {boolean} [usingNewAttachmentAPI=true] Use new attachment API
|
||||||
* @property {string} [interactionTimeout=15000] The amount of time in milliseconds to wait for an interaction response, before rejecting
|
* @property {string} [interactionTimeout=15000] The amount of time in milliseconds to wait for an interaction response, before rejecting
|
||||||
@ -164,6 +165,7 @@ class Options extends null {
|
|||||||
autoRedeemNitro: false,
|
autoRedeemNitro: false,
|
||||||
captchaService: '',
|
captchaService: '',
|
||||||
captchaKey: null,
|
captchaKey: null,
|
||||||
|
captchaRetryLimit: 3,
|
||||||
DMSync: false,
|
DMSync: false,
|
||||||
patchVoice: false,
|
patchVoice: false,
|
||||||
password: null,
|
password: null,
|
||||||
|
Loading…
Reference in New Issue
Block a user