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)
|
val ud = UserRepository.getUserByID(u.id.value)
|
||||||
if (ud.isAwake) {
|
if (ud.isAwake) {
|
||||||
// User is already awake
|
// User is already awake
|
||||||
|
if (ud.currentStreak == 0 && ud.lastWakeup + (1000*60*60*12) > System.currentTimeMillis()) {
|
||||||
if (ud.currentStreak == 0) {
|
|
||||||
// User failed last time
|
// User failed last time
|
||||||
this.respond {
|
this.respond {
|
||||||
this.embeds.add(
|
this.embeds.add(
|
||||||
|
@ -63,7 +62,8 @@ class AwakeExtension : Extension() {
|
||||||
MessageUtil.getEmbed(
|
MessageUtil.getEmbed(
|
||||||
EmbedColor.ERROR,
|
EmbedColor.ERROR,
|
||||||
"You are already awake!",
|
"You are already awake!",
|
||||||
"You can set a wakeup time for tomorrow with `/time`",
|
"There is nothing to change. You are already awake\n" +
|
||||||
|
"You can set a wakeup time for tomorrow with `/time`",
|
||||||
u.username,
|
u.username,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue