fix rollQueue to handle a queued api roll if it happens
This commit is contained in:
		
							parent
							
								
									1069b99091
								
							
						
					
					
						commit
						e0e013bf61
					
				|  | @ -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); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue