Compare commits
2 Commits
514f4757a9
...
6fef1d0092
Author | SHA1 | Date | |
---|---|---|---|
6fef1d0092 | |||
f7aba7a49b |
@ -19,7 +19,7 @@ public class ChannelUtils {
|
|||||||
* @return the user with the given id
|
* @return the user with the given id
|
||||||
*/
|
*/
|
||||||
private static TextChannel getTextChannel(String id, int retries) {
|
private static TextChannel getTextChannel(String id, int retries) {
|
||||||
if (retries >= 25) {
|
if (retries >= 10) {
|
||||||
log.error("Failed to find user \"{}\" after {} retries.", id, retries);
|
log.error("Failed to find user \"{}\" after {} retries.", id, retries);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ public class UserUtils {
|
|||||||
* @return the user with the given id
|
* @return the user with the given id
|
||||||
*/
|
*/
|
||||||
private static User getUser(String id, int retries) {
|
private static User getUser(String id, int retries) {
|
||||||
if (retries >= 25) {
|
if (retries >= 10) {
|
||||||
log.error("Failed to find user \"{}\" after {} retries.", id, retries);
|
log.error("Failed to find user \"{}\" after {} retries.", id, retries);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ public class BirthdayFeature extends Feature implements EventListener {
|
|||||||
private void checkBirthdays() {
|
private void checkBirthdays() {
|
||||||
for (Guild guild : DiscordService.JDA.getGuilds()) {
|
for (Guild guild : DiscordService.JDA.getGuilds()) {
|
||||||
BatGuild batGuild = guildService.getGuild(guild.getId());
|
BatGuild batGuild = guildService.getGuild(guild.getId());
|
||||||
if (batGuild == null) {
|
if (batGuild.getFeatureProfile().isFeatureDisabled(this)) { // Check if the feature is disabled
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
BirthdayProfile profile = batGuild.getBirthdayProfile();
|
BirthdayProfile profile = batGuild.getBirthdayProfile();
|
||||||
|
@ -38,6 +38,10 @@ public class MinecraftFeature extends Feature {
|
|||||||
public void checkServers() {
|
public void checkServers() {
|
||||||
for (Guild guild : DiscordService.JDA.getGuilds()) {
|
for (Guild guild : DiscordService.JDA.getGuilds()) {
|
||||||
BatGuild batGuild = guildService.getGuild(guild.getId());
|
BatGuild batGuild = guildService.getGuild(guild.getId());
|
||||||
|
if (batGuild.getFeatureProfile().isFeatureDisabled(this)) { // Check if the feature is disabled
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
batGuild.getMinecraftProfile().checkServers();
|
batGuild.getMinecraftProfile().checkServers();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user