mirror of
https://github.com/Burn-E99/TheArtificer.git
synced 2026-06-04 09:03:50 -04:00
fix rollQueue to handle a queued api roll if it happens
This commit is contained in:
@@ -222,9 +222,11 @@ setInterval(async () => {
|
|||||||
);
|
);
|
||||||
if (rollQueue.length && currentWorkers < config.limits.maxWorkers) {
|
if (rollQueue.length && currentWorkers < config.limits.maxWorkers) {
|
||||||
const temp = rollQueue.shift();
|
const temp = rollQueue.shift();
|
||||||
if (temp) {
|
if (temp && !temp.apiRoll) {
|
||||||
temp.dd.m.edit(rollingEmbed).catch((e: Error) => utils.commonLoggers.messageEditError('rollQueue.ts:208', temp.dd.m, e));
|
temp.dd.m.edit(rollingEmbed).catch((e: Error) => utils.commonLoggers.messageEditError('rollQueue.ts:208', temp.dd.m, e));
|
||||||
handleRollWorker(temp);
|
handleRollWorker(temp);
|
||||||
|
} else if (temp && temp.apiRoll) {
|
||||||
|
handleRollWorker(temp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|||||||
Reference in New Issue
Block a user