fix rollQueue to handle a queued api roll if it happens

This commit is contained in:
Ean Milligan 2025-04-26 15:16:16 -04:00
parent 1069b99091
commit e0e013bf61
1 changed files with 3 additions and 1 deletions

View File

@ -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);