Don't disconnect on reload

This commit is contained in:
Business Goose 2022-03-31 03:23:02 +01:00
parent 4782438bc8
commit d8f8c45246
No known key found for this signature in database
GPG key ID: 77DCA801362E9645

View file

@ -1,8 +1,6 @@
package me.StevenLawson.TotalFreedomMod.discord.bridge;
import java.util.Optional;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.regex.Pattern;
import me.StevenLawson.TotalFreedomMod.Log;
import me.StevenLawson.TotalFreedomMod.admin.AdminList;
@ -208,7 +206,7 @@ public class DiscordBridge {
CHANNEL.sendMessage(sanitizeMessage(message)).get();
} catch (Exception ignored) {
}
CountDownLatch shutdownWaiter = new CountDownLatch(1);
/*CountDownLatch shutdownWaiter = new CountDownLatch(1);
Thread t = new Thread(() -> {
DISCORD_API.addLostConnectionListener(
@ -220,7 +218,7 @@ public class DiscordBridge {
} catch (InterruptedException ignored) {
}
});
t.start();
t.start();*/
}
}
@ -239,7 +237,7 @@ public class DiscordBridge {
ADMIN_CHANNEL.sendMessage(sanitizeMessage(message)).get();
} catch (Exception ignored) {
}
DISCORD_API.disconnect();
//DISCORD_API.disconnect();
}
}