Skip to content

Commit 9692454

Browse files
Added missing bonus points for best answers
1 parent ac83968 commit 9692454

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/net/javadiscord/javabot/systems/qotw/submissions/SubmissionManager.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ public void acceptSubmission(InteractionHook hook, @NotNull ThreadChannel thread
139139
thread.getManager().setName(SUBMISSION_ACCEPTED + thread.getName().substring(1)).queue();
140140
pointsService.increment(author.getIdLong());
141141
notificationService.withQOTW(thread.getGuild(), author).sendAccountIncrementedNotification();
142+
if (bestAnswer) {
143+
pointsService.increment(author.getIdLong());
144+
notificationService.withQOTW(thread.getGuild(), author).sendBestAnswerNotification();
145+
}
142146
Responses.success(hook, "Submission Accepted",
143147
"Successfully accepted submission by " + author.getAsMention()).queue();
144148
notificationService.withQOTW(thread.getGuild()).sendSubmissionActionNotification(author, new QOTWSubmission(thread), bestAnswer ? SubmissionStatus.ACCEPT_BEST : SubmissionStatus.ACCEPT);

0 commit comments

Comments
 (0)