Move shutdown log to delayed actions
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Bea 2022-08-26 03:50:43 +02:00
parent d15132e6d6
commit 70570624e1
1 changed files with 1 additions and 1 deletions

View File

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