Add basic shutdown command
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Bea 2022-08-26 03:46:36 +02:00
parent 0c09a03255
commit ffab94f525

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.events.message.MessageReceivedEvent;
import net.dv8tion.jda.api.hooks.ListenerAdapter; import net.dv8tion.jda.api.hooks.ListenerAdapter;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import wtf.beatrice.hidekobot.HidekoBot;
import wtf.beatrice.hidekobot.utils.Logger; import wtf.beatrice.hidekobot.utils.Logger;
import wtf.beatrice.hidekobot.utils.RandomUtil; import wtf.beatrice.hidekobot.utils.RandomUtil;
@ -85,5 +86,17 @@ public class MessageListener extends ListenerAdapter
return; 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;
}
} }
} }