Add basic shutdown command
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Bea 2022-08-26 03:46:36 +02:00
parent 0c09a03255
commit ffab94f525
1 changed files with 13 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import net.dv8tion.jda.api.entities.*;
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
import net.dv8tion.jda.api.hooks.ListenerAdapter;
import org.jetbrains.annotations.NotNull;
import wtf.beatrice.hidekobot.HidekoBot;
import wtf.beatrice.hidekobot.utils.Logger;
import wtf.beatrice.hidekobot.utils.RandomUtil;
@ -85,5 +86,17 @@ public class MessageListener extends ListenerAdapter
return;
}
if(eventMessage.equalsIgnoreCase("hideko die"))
{
MessageChannel channel = event.getChannel();
channel.sendMessage("Going to sleep! Cya :sparkles:").queue();
HidekoBot.getAPI().shutdown();
System.exit(0);
return;
}
}
}