fix: more fix in Main
This commit is contained in:
parent
5e9a1f0917
commit
f322e2dd14
1 changed files with 8 additions and 6 deletions
|
@ -215,15 +215,17 @@ public class Main {
|
||||||
final boolean discordEnabled = config.discord.enabled;
|
final boolean discordEnabled = config.discord.enabled;
|
||||||
|
|
||||||
for (Bot bot : copiedList) {
|
for (Bot bot : copiedList) {
|
||||||
if (discordEnabled) {
|
try {
|
||||||
final String channelId = bot.discord.servers.get(bot.host + ":" + bot.port);
|
if (discordEnabled) {
|
||||||
|
final String channelId = bot.discord.servers.get(bot.host + ":" + bot.port);
|
||||||
|
|
||||||
bot.discord.sendMessageInstantly("Stopping..", channelId);
|
bot.discord.sendMessageInstantly("Stopping..", channelId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ircEnabled) bot.irc.quit("Stopping..");
|
if (ircEnabled) bot.irc.quit("Stopping..");
|
||||||
|
|
||||||
bot.stop();
|
bot.stop();
|
||||||
|
} catch (Exception ignored) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (jda != null) jda.shutdown();
|
if (jda != null) jda.shutdown();
|
||||||
|
|
Loading…
Reference in a new issue