Correct DailyMadame only run in 1 guild

This commit is contained in:
Sebastien 2018-05-14 16:45:01 +02:00
parent 5089671b4c
commit 9a00cba123

View File

@ -20,17 +20,20 @@ public class DailyMadame implements NewDayListener{
@Override @Override
public void onNewDay() { public void onNewDay() {
Redirection redirect = new Redirection(); Redirection redirect = new Redirection();
boolean success=false;
boolean error=false;
int errorCp=0;
List<Guild> guilds = MainBot.jda.getGuilds(); List<Guild> guilds = MainBot.jda.getGuilds();
for(Guild guild : guilds){ for(Guild guild : guilds){
TextChannel chanel = null; TextChannel chanel = null;
boolean success=false;
boolean error=false;
int errorCp=0;
logger.debug(guild.getName());
for(TextChannel iterator : guild.getTextChannels()) for(TextChannel iterator : guild.getTextChannels())
{ {
if(iterator.isNSFW()){ if(iterator.isNSFW()){
chanel = iterator; chanel = iterator;
logger.debug("break: " + chanel.getName());
break; break;
} }
} }