fix: more fix in Main

This commit is contained in:
Chayapak 2024-11-12 19:28:09 +07:00
parent 5e9a1f0917
commit f322e2dd14
Signed by: ChomeNS
SSH key fingerprint: SHA256:0YoxhdyXsgbc0nfeB2N6FYE60mxMU7DS4uCUMaw2mvA

View file

@ -215,15 +215,17 @@ public class Main {
final boolean discordEnabled = config.discord.enabled;
for (Bot bot : copiedList) {
if (discordEnabled) {
final String channelId = bot.discord.servers.get(bot.host + ":" + bot.port);
try {
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();