fix: "you failed" response now only shows up, up to 12 hrs after fail
This commit is contained in:
parent
e4102cc56b
commit
e996eebd1f
1 changed files with 3 additions and 3 deletions
|
@ -42,8 +42,7 @@ class AwakeExtension : Extension() {
|
|||
val ud = UserRepository.getUserByID(u.id.value)
|
||||
if (ud.isAwake) {
|
||||
// User is already awake
|
||||
|
||||
if (ud.currentStreak == 0) {
|
||||
if (ud.currentStreak == 0 && ud.lastWakeup + (1000*60*60*12) > System.currentTimeMillis()) {
|
||||
// User failed last time
|
||||
this.respond {
|
||||
this.embeds.add(
|
||||
|
@ -63,6 +62,7 @@ class AwakeExtension : Extension() {
|
|||
MessageUtil.getEmbed(
|
||||
EmbedColor.ERROR,
|
||||
"You are already awake!",
|
||||
"There is nothing to change. You are already awake\n" +
|
||||
"You can set a wakeup time for tomorrow with `/time`",
|
||||
u.username,
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue