fix: align dojo component DestructionTime to full seconds (#1394)
not doing this causes the client to spam requests and have some UI bugs Reviewed-on: #1394 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									516f822e43
								
							
						
					
					
						commit
						9e99d0370c
					
				| @ -16,7 +16,7 @@ export const queueDojoComponentDestructionController: RequestHandler = async (re | ||||
|     const componentId = req.query.componentId as string; | ||||
| 
 | ||||
|     guild.DojoComponents.id(componentId)!.DestructionTime = new Date( | ||||
|         Date.now() + (config.fastDojoRoomDestruction ? 5_000 : 2 * 3600_000) | ||||
|         (Math.trunc(Date.now() / 1000) + (config.fastDojoRoomDestruction ? 5 : 2 * 3600)) * 1000 | ||||
|     ); | ||||
| 
 | ||||
|     await guild.save(); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user