fix: CaptchaSolver - Cannot read properties of undefined (reading 'slice')

This commit is contained in:
March 7th 2022-12-22 18:51:49 +07:00
parent 0d99a2862a
commit a6099af525

View File

@ -47,9 +47,7 @@ module.exports = class CaptchaSolver {
sitekey: siteKey, sitekey: siteKey,
url: 'https://discord.com', url: 'https://discord.com',
}) })
.then(res => { .then(res => (res ? resolve(res) : reject(new Error('Captcha could not be solved'))))
resolve(res);
})
.catch(reject); .catch(reject);
}); });
break; break;