From d478751a0b47badcdf75a0dbd5db2e3882dcf0e5 Mon Sep 17 00:00:00 2001 From: DaInfLoop Date: Sat, 22 Jun 2024 19:51:55 +0100 Subject: [PATCH] fix: timings are weird?? --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 1fc979f..b8962bc 100644 --- a/index.js +++ b/index.js @@ -1040,7 +1040,7 @@ app.command('/b-daily', async (ctx) => { await sql`UPDATE users SET cshards = ${user.cshards + cshards}, spoints = ${user.spoints + spoints} WHERE slack_id = ${ctx.context.userId};` - await sql`UPDATE cooldowns SET daily = ${new Date(now.getTime() + 24 * 60 * 60 * 1000)};` + await sql`UPDATE cooldowns SET daily = ${new Date(now.getTime() + (24 * 60 * 60 * 1000))};` } else { ctx.respond({ response_type: 'ephemeral', @@ -1085,7 +1085,7 @@ app.command('/b-weekly', async (ctx) => { await sql`UPDATE users SET cshards = ${user.cshards + cshards}, dshards = ${user.dshards + dshards}, spoints = ${user.spoints + spoints} WHERE slack_id = ${ctx.context.userId};` - await sql`UPDATE cooldowns SET weekly = ${new Date(now.getTime() + 7 * 24 * 60 * 60 * 1000)};` + await sql`UPDATE cooldowns SET weekly = ${new Date(now.getTime() + (7 * 24 * 60 * 60 * 1000))};` } else { ctx.respond({ response_type: 'ephemeral', @@ -1130,7 +1130,7 @@ app.command('/b-monthly', async (ctx) => { await sql`UPDATE users SET cshards = ${user.cshards + cshards}, dshards = ${user.dshards + dshards}, spoints = ${user.spoints + spoints} WHERE slack_id = ${ctx.context.userId};` - await sql`UPDATE cooldowns SET monthly = ${new Date(now.getTime() + 30 * 7 * 24 * 60 * 60 * 1000)};` + await sql`UPDATE cooldowns SET monthly = ${new Date(now.getTime() + (30 * 7 * 24 * 60 * 60 * 1000))};` } else { ctx.respond({ response_type: 'ephemeral',