Skip to content

Commit 0b10582

Browse files
Swapped staff-role with qotw-role
1 parent 475fb41 commit 0b10582

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import net.dv8tion.jda.api.JDA;
44
import net.dv8tion.jda.api.entities.Guild;
55
import net.javadiscord.javabot.data.config.BotConfig;
6-
import net.javadiscord.javabot.data.config.guild.ModerationConfig;
6+
import net.javadiscord.javabot.data.config.guild.QOTWConfig;
77
import net.javadiscord.javabot.systems.notification.NotificationService;
88
import net.javadiscord.javabot.systems.qotw.dao.QuestionQueueRepository;
99
import net.javadiscord.javabot.systems.qotw.model.QOTWQuestion;
@@ -15,8 +15,6 @@
1515
import java.sql.SQLException;
1616
import 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

Comments
 (0)