33import net .dv8tion .jda .api .JDA ;
44import net .dv8tion .jda .api .entities .Guild ;
55import net .javadiscord .javabot .data .config .BotConfig ;
6- import net .javadiscord .javabot .data .config .guild .ModerationConfig ;
6+ import net .javadiscord .javabot .data .config .guild .QOTWConfig ;
77import net .javadiscord .javabot .systems .notification .NotificationService ;
88import net .javadiscord .javabot .systems .qotw .dao .QuestionQueueRepository ;
99import net .javadiscord .javabot .systems .qotw .model .QOTWQuestion ;
1515import java .sql .SQLException ;
1616import java .util .Optional ;
1717
18- import javax .sql .DataSource ;
19-
2018/**
2119 * Checks that there's a question in the QOTW queue ready for posting soon.
2220 */
@@ -26,7 +24,6 @@ public class QOTWReminderJob {
2624 private final JDA jda ;
2725 private final NotificationService notificationService ;
2826 private final BotConfig botConfig ;
29- private final DataSource dataSource ;
3027 private final QuestionQueueRepository questionQueueRepository ;
3128
3229 /**
@@ -36,12 +33,12 @@ public class QOTWReminderJob {
3633 @ Scheduled (cron = "0 0 9 * * *" ) // Daily, 09:00 UTC
3734 public void execute () throws SQLException {
3835 for (Guild guild : jda .getGuilds ()) {
39- ModerationConfig config = botConfig .get (guild ).getModerationConfig ();
36+ QOTWConfig config = botConfig .get (guild ).getQotwConfig ();
4037 Optional <QOTWQuestion > q = questionQueueRepository .getNextQuestion (guild .getIdLong ());
4138 if (q .isEmpty ()) {
4239 notificationService .withGuild (guild ).sendToModerationLog (m -> m .sendMessageFormat (
4340 "Warning! %s There's no Question of the Week in the queue. Please add one before it's time to post!" ,
44- config .getStaffRole ().getAsMention ()));
41+ config .getQOTWReviewRole ().getAsMention ()));
4542 }
4643 }
4744 }
0 commit comments