diff --git a/src/rest/CaptchaSolver.js b/src/rest/CaptchaSolver.js index 1b8a15e..82966b5 100644 --- a/src/rest/CaptchaSolver.js +++ b/src/rest/CaptchaSolver.js @@ -47,9 +47,7 @@ module.exports = class CaptchaSolver { sitekey: siteKey, url: 'https://discord.com', }) - .then(res => { - resolve(res); - }) + .then(res => (res ? resolve(res) : reject(new Error('Captcha could not be solved')))) .catch(reject); }); break;