Skip to content

Commit 406771a

Browse files
committed
add a proper implementation for next reset time
1 parent a23c8d7 commit 406771a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/commands/status.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@ class UserCommand extends Command {
3636
);
3737
console.log(lock.users.length);
3838
if (lock.users.length === 0) {
39+
var d = new Date();
40+
d.setUTCHours(23, 55, 0, 0);
3941
embed = new EmbedBuilder()
4042
.setTitle(
4143
"The Creative Server is currently unlocked and is due to be overwritten at",
4244
)
43-
.setDescription(`<t:${Math.floor(lock.next_update / 1000)}:f>`)
45+
.setDescription(`<t:${Math.floor(d.getTime() / 1000)}:f>`)
4446
.setColor("#FF91AF");
4547
} else {
4648
embed = new EmbedBuilder()

0 commit comments

Comments
 (0)