fix: timings are weird??
This commit is contained in:
parent
4850b94bcd
commit
d478751a0b
6
index.js
6
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',
|
||||
|
|
Loading…
Reference in a new issue