13.1.8 debug work command

This commit is contained in:
SowinskiBraeden committed 2022-10-31 18:36:43 -07:00
1 parent 7850747d6f
commit db60ccd458
3 files changed
+6 -5

No files matched your search

+4 -3
View File
@@ -59,9 +59,10 @@ module.exports = {
if (!success) return client.sendInternalError(interaction, 'Failed to add inventory');
}
const now = new Date();
const msBetweenDates = Math.abs(inventory.lastWork - now)
const hoursBetweenDates = msBetweenDates / (60 * 60 * 1000)
let now = new Date();
let diff = (now - inventory.guilds[GuildDB.serverID].lastWork) / 1000;
diff /= (60 * 60);
let hoursBetweenDates = Math.abs(Math.round(diff));
if (hoursBetweenDates >= 24) {
let workRoles = []