use of com.github.vaerys.commands.general.NewDailyMessage in project DiscordSailv2 by Vaerys-Dawn.
the class GuildObject method checkToggles.
private void checkToggles() {
toRemove = new ArrayList<>();
for (GuildToggle g : toggles) {
if (!g.enabled(config)) {
g.execute(this);
}
}
for (GuildToggle g : toRemove) {
ListIterator iterator = toggles.listIterator();
while (iterator.hasNext()) {
GuildToggle toggle = (GuildToggle) iterator.next();
if (toggle.name() == g.name()) {
if (g.isModule()) {
logger.trace("Module: " + g.name() + " removed.");
} else {
logger.trace("Toggle: " + g.name() + " removed.");
}
iterator.remove();
}
}
}
IChannel channel = client.get().getChannelByID(Globals.queueChannelID);
if (channel == null) {
ListIterator iterator = commands.listIterator();
while (iterator.hasNext()) {
Command command = (Command) iterator.next();
if (command.names[0] == new NewDailyMessage().names[0]) {
logger.trace(longID + ": Removed newDailyMsg command.");
iterator.remove();
}
}
}
}
Aggregations