Skip to content

Commit d78afa6

Browse files
Improved QOTWSubmission#retrieveAuthor
1 parent 8395b18 commit d78afa6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/net/javadiscord/javabot/systems/qotw/model/QOTWSubmission.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ public boolean hasAuthor() {
2626
* @param onSuccess The success-{@link Consumer} for this operation.
2727
*/
2828
public void retrieveAuthor(Consumer<User> onSuccess) {
29+
if (author != null) {
30+
onSuccess.accept(author);
31+
return;
32+
}
2933
thread.retrieveThreadMembers().queue(s -> s.forEach(m -> {
3034
if (author == null && !m.getUser().isBot()) {
3135
author = m.getUser();

0 commit comments

Comments
 (0)