wtf nopecha api ???

This commit is contained in:
March 7th 2022-12-23 17:58:10 +07:00
parent 0aa7ba2f1b
commit 67ab8277ed
2 changed files with 3 additions and 3 deletions

View File

@ -39,12 +39,12 @@ module.exports = class CaptchaSolver {
}); });
this.service = 'nopecha'; this.service = 'nopecha';
this.solver = new NopeCHAApi(configuration); this.solver = new NopeCHAApi(configuration);
this.solve = siteKey => this.solve = sitekey =>
new Promise((resolve, reject) => { new Promise((resolve, reject) => {
this.solver this.solver
.solveToken({ .solveToken({
type: 'hcaptcha', type: 'hcaptcha',
sitekey: siteKey, sitekey,
url: 'https://discord.com', url: 'https://discord.com',
}) })
.then(res => (res ? resolve(res) : reject(new Error('Captcha could not be solved')))) .then(res => (res ? resolve(res) : reject(new Error('Captcha could not be solved'))))

View File

@ -375,7 +375,7 @@ class RequestHandler {
Method : ${request.method} Method : ${request.method}
Path : ${request.path} Path : ${request.path}
Route : ${request.route} Route : ${request.route}
Key : ${captcha.slice(0, 50)}...`, Key : ${captcha}`,
); );
request.retries++; request.retries++;
return this.execute(request, captcha, data.captcha_rqtoken); return this.execute(request, captcha, data.captcha_rqtoken);