Move shutdown log to delayed actions
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Bea 2022-08-26 03:50:43 +02:00
parent d15132e6d6
commit 70570624e1

View File

@ -94,10 +94,10 @@ public class MessageListener extends ListenerAdapter
MessageChannel channel = event.getChannel(); MessageChannel channel = event.getChannel();
channel.sendMessage("Going to sleep! Cya :sparkles:").queue(); channel.sendMessage("Going to sleep! Cya :sparkles:").queue();
logger.log("WARNING! Shutting down!");
Executors.newSingleThreadScheduledExecutor().schedule(() -> Executors.newSingleThreadScheduledExecutor().schedule(() ->
{ {
logger.log("WARNING! Shutting down!");
HidekoBot.getAPI().shutdown(); HidekoBot.getAPI().shutdown();
System.exit(0); System.exit(0);
}, 5, TimeUnit.SECONDS); }, 5, TimeUnit.SECONDS);