From 1786199dc4d6070ed997f3df4b5f0c01efe37bae Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Sun, 30 Mar 2025 21:44:43 +0200 Subject: [PATCH] fix: align dojo component DestructionTime to full seconds not doing this causes the client to spam requests and have some UI bugs --- src/controllers/api/queueDojoComponentDestructionController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/api/queueDojoComponentDestructionController.ts b/src/controllers/api/queueDojoComponentDestructionController.ts index 361f91f8..037b5c27 100644 --- a/src/controllers/api/queueDojoComponentDestructionController.ts +++ b/src/controllers/api/queueDojoComponentDestructionController.ts @@ -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();