diff --git a/src/main/java/com/javadiscord/bot/events/AutoCloseQuestionEvent.java b/src/main/java/com/javadiscord/bot/events/AutoCloseQuestionEvent.java index 3f1dc3f..288aaa7 100644 --- a/src/main/java/com/javadiscord/bot/events/AutoCloseQuestionEvent.java +++ b/src/main/java/com/javadiscord/bot/events/AutoCloseQuestionEvent.java @@ -40,7 +40,7 @@ public void run() { .complete(); List messages = history.getRetrievedHistory(); if (Duration.between( - messages.getLast().getTimeCreated(), + messages.getFirst().getTimeCreated(), OffsetDateTime.now(ZoneOffset.UTC)) .toHours() > AUTO_CLOSE_HOURS) { diff --git a/src/main/java/com/javadiscord/bot/events/BumpReminderEvent.java b/src/main/java/com/javadiscord/bot/events/BumpReminderEvent.java index 212daff..91f318b 100644 --- a/src/main/java/com/javadiscord/bot/events/BumpReminderEvent.java +++ b/src/main/java/com/javadiscord/bot/events/BumpReminderEvent.java @@ -36,7 +36,7 @@ public void run() { sendBumpNotification(bumpChannel); } else { if (Duration.between( - messages.getLast().getTimeCreated(), + messages.getFirst().getTimeCreated(), OffsetDateTime.now(ZoneOffset.UTC)) .toHours() > BUMP_TIME_HOURS) {