This commit is contained in:
Dragon Fire
2021-03-18 17:49:27 -04:00
parent ac4813b710
commit 0338f71791
-2
View File
@@ -33,9 +33,7 @@ module.exports = class OcrCommand extends Command {
await worker.loadLanguage('eng');
await worker.initialize('eng');
let timedOut = false;
let finished = false;
const timeout = setTimeout(async () => {
if (finished) return;
timedOut = true;
await worker.terminate();
await reactIfAble(msg, msg.author, FAILURE_EMOJI_ID, '❌');