From 67ab8277ed862213b50a222f570d4f96def90d9e Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Fri, 23 Dec 2022 17:58:10 +0700 Subject: [PATCH] wtf nopecha api ??? --- src/rest/CaptchaSolver.js | 4 ++-- src/rest/RequestHandler.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rest/CaptchaSolver.js b/src/rest/CaptchaSolver.js index 82966b5..08ffc96 100644 --- a/src/rest/CaptchaSolver.js +++ b/src/rest/CaptchaSolver.js @@ -39,12 +39,12 @@ module.exports = class CaptchaSolver { }); this.service = 'nopecha'; this.solver = new NopeCHAApi(configuration); - this.solve = siteKey => + this.solve = sitekey => new Promise((resolve, reject) => { this.solver .solveToken({ type: 'hcaptcha', - sitekey: siteKey, + sitekey, url: 'https://discord.com', }) .then(res => (res ? resolve(res) : reject(new Error('Captcha could not be solved')))) diff --git a/src/rest/RequestHandler.js b/src/rest/RequestHandler.js index 1f3152b..7648c02 100644 --- a/src/rest/RequestHandler.js +++ b/src/rest/RequestHandler.js @@ -375,7 +375,7 @@ class RequestHandler { Method : ${request.method} Path : ${request.path} Route : ${request.route} - Key : ${captcha.slice(0, 50)}...`, + Key : ${captcha}`, ); request.retries++; return this.execute(request, captcha, data.captcha_rqtoken);