WIP: Port Discord Bot to JDA 5.0 #462
@ -55,6 +55,7 @@ import net.md_5.bungee.config.YamlConfiguration;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.time.Duration;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -224,6 +225,10 @@ public class BungeeCore extends Plugin {
|
||||
if (SteamwarDiscordBotConfig.loaded) {
|
||||
try {
|
||||
SteamwarDiscordBot.instance().getJda().shutdown();
|
||||
if(!SteamwarDiscordBot.instance().getJda().awaitShutdown(Duration.ofSeconds(10))) {
|
||||
SteamwarDiscordBot.instance().getJda().shutdownNow();
|
||||
SteamwarDiscordBot.instance().getJda().awaitShutdown();
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
getLogger().log(Level.SEVERE, "Could not shutdown discord bot", e);
|
||||
}
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
package de.steamwar.bungeecore.bot.commands;
|
||||
|
||||
import de.steamwar.bungeecore.commands.PunishmentCommand;
|
||||
import de.steamwar.sql.BannedUserIPs;
|
||||
import de.steamwar.sql.Punishment;
|
||||
import de.steamwar.sql.SteamwarUser;
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren