Skip to content

Commit

Permalink
Added a stop confirmation message.
Browse files Browse the repository at this point in the history
  • Loading branch information
EazyFTW committed Aug 25, 2020
1 parent f26cf24 commit f1bde75
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,18 @@ public int getCooldown() {

@Override
public void onCommand(TextChannel channel, Message message, Member member, String[] args) {
new TechEmbedBuilder("Stop")
if(args.length == 1 && args[0].equals("acTualLy sToP")) {
new TechEmbedBuilder("Stop")
.setText("The bot will now stop!")
.send(channel);
TechDiscordBot.getJDA().shutdownNow();
System.exit(0);
TechDiscordBot.getJDA().shutdownNow();
System.exit(0);
} else {
new TechEmbedBuilder("Stop")
.setText("Hello, " + member.getAsMention() + "! I've detected that you're trying to stop the me!" +
"\n\nI do not like that, especially that if I do stop, I will not be restarted! If you **REALLY** wish to stop me, type the following command:\n`!stop acTualLy sToP`")
.send(channel);

}
}
}

0 comments on commit f1bde75

Please sign in to comment.