Skip to content

Commit c295c62

Browse files
some cleanup
1 parent 96a93ea commit c295c62

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/net/javadiscord/javabot/systems/help/HelpForumUpdater.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ private void checkForumPost(@NotNull ThreadChannel post, HelpConfig config) {
5151
log.error("Could not find messages in forum thread {}", post.getId());
5252
return;
5353
}
54+
// Simply get the first one, as we only requested a singular message
5455
Message latest = messages.get(0);
5556
long minutesAgo = (Instant.now().getEpochSecond() - latest.getTimeCreated().toEpochSecond()) / 60;
5657
boolean isThankMessage = isThanksMessage(latest);
@@ -64,7 +65,7 @@ private void checkForumPost(@NotNull ThreadChannel post, HelpConfig config) {
6465
post.getName(), post.getOwnerId(), minutesAgo);
6566
});
6667
}
67-
}, e -> log.error("Could not find latest message in forum thread {}", post.getId()));
68+
}, e -> log.error("Could not find latest message in forum thread {}:", post.getId(), e));
6869
}
6970

7071
private boolean isThanksMessage(@NotNull Message m) {

0 commit comments

Comments
 (0)