Skip to content

Commit 475fb41

Browse files
Added notice for unreviewed submissions
1 parent 6e06164 commit 475fb41

File tree

1 file changed

+4
-1
lines changed
  • src/main/java/net/javadiscord/javabot/systems/qotw

1 file changed

+4
-1
lines changed

src/main/java/net/javadiscord/javabot/systems/qotw/QOTWJob.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ public void execute() throws SQLException {
5555
} else {
5656
QOTWQuestion question = nextQuestion.get();
5757
QOTWConfig qotw = config.getQotwConfig();
58-
qotw.getSubmissionChannel().getThreadChannels().forEach(thread -> thread.getManager().setLocked(true).setArchived(true).queue());
58+
qotw.getSubmissionChannel().getThreadChannels().forEach(thread -> {
59+
notificationService.withGuild(guild).sendToModerationLog(log -> log.sendMessageFormat("Closed unreviewed submission thread %s", thread.getAsMention()));
60+
thread.getManager().setLocked(true).setArchived(true).queue();
61+
});
5962
qotw.getSubmissionChannel().getManager()
6063
.putRolePermissionOverride(guild.getIdLong(), Set.of(Permission.VIEW_CHANNEL, Permission.MESSAGE_SEND_IN_THREADS), Collections.singleton(Permission.MESSAGE_SEND))
6164
.queue();

0 commit comments

Comments
 (0)