fix work streaks

This commit is contained in:
Jonny_Bro (Nikita) 2024-05-21 22:38:43 +05:00
parent 937eabf1bd
commit 1896d3e41a
Signed by: jonny_bro
GPG key ID: 3F1ECC04147E9BD8

View file

@ -37,7 +37,7 @@ class Work extends BaseCommand {
});
}
if (Date.now() > memberData.cooldowns.work + 24 * 60 * 60 * 1000) memberData.workStreak = 0;
if (Date.now() > Math.floor(memberData.cooldowns.work + 24 * 60 * 60 * 1000) / 1000) memberData.workStreak = 0;
const toWait = Math.floor((Date.now() + 24 * 60 * 60 * 1000) / 1000); // 24 hours
memberData.cooldowns.work = toWait;