check feature states
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 1m8s

This commit is contained in:
Lee 2024-07-06 06:26:33 +01:00
parent f7aba7a49b
commit 6fef1d0092
2 changed files with 5 additions and 1 deletions

@ -36,7 +36,7 @@ public class BirthdayFeature extends Feature implements EventListener {
private void checkBirthdays() {
for (Guild guild : DiscordService.JDA.getGuilds()) {
BatGuild batGuild = guildService.getGuild(guild.getId());
if (batGuild == null) {
if (batGuild.getFeatureProfile().isFeatureDisabled(this)) { // Check if the feature is disabled
continue;
}
BirthdayProfile profile = batGuild.getBirthdayProfile();

@ -38,6 +38,10 @@ public class MinecraftFeature extends Feature {
public void checkServers() {
for (Guild guild : DiscordService.JDA.getGuilds()) {
BatGuild batGuild = guildService.getGuild(guild.getId());
if (batGuild.getFeatureProfile().isFeatureDisabled(this)) { // Check if the feature is disabled
continue;
}
batGuild.getMinecraftProfile().checkServers();
}
}