fix: align dojo component DestructionTime to full seconds
All checks were successful
Build / build (20) (push) Successful in 39s
Build / build (22) (push) Successful in 1m14s
Build / build (18) (pull_request) Successful in 41s
Build / build (18) (push) Successful in 1m21s
Build / build (20) (pull_request) Successful in 1m13s
Build / build (22) (pull_request) Successful in 37s

not doing this causes the client to spam requests and have some UI bugs
This commit is contained in:
Sainan 2025-03-30 21:44:43 +02:00
parent 516f822e43
commit 1786199dc4

View File

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