diff --git a/src/main/java/tech/nevets/constelliabot/commands/CommandManager.java b/src/main/java/tech/nevets/constelliabot/commands/CommandManager.java index a9f1dc3..1dc2441 100644 --- a/src/main/java/tech/nevets/constelliabot/commands/CommandManager.java +++ b/src/main/java/tech/nevets/constelliabot/commands/CommandManager.java @@ -14,6 +14,7 @@ import tech.nevets.constelliabot.commands.pictures.FoxCmd; import tech.nevets.constelliabot.commands.pictures.PandaCmd; import tech.nevets.constelliabot.commands.strings.GoodMorningCmd; import tech.nevets.constelliabot.commands.strings.EbieKonRenCmd; +import tech.nevets.constelliabot.commands.strings.JangoTheSovietCmd; import javax.annotation.Nullable; import java.util.ArrayList; @@ -35,6 +36,7 @@ public class CommandManager { addCommand(new FoxCmd()); addCommand(new GoodMorningCmd()); addCommand(new HelpCmd(this)); + addCommand(new JangoTheSovietCmd()); //addCommand(new JoinCmd()); addCommand(new PandaCmd()); addCommand(new PingCmd()); diff --git a/src/main/java/tech/nevets/constelliabot/commands/strings/EbieKonRenCmd.java b/src/main/java/tech/nevets/constelliabot/commands/strings/EbieKonRenCmd.java index d7fa7ef..cb33a1f 100644 --- a/src/main/java/tech/nevets/constelliabot/commands/strings/EbieKonRenCmd.java +++ b/src/main/java/tech/nevets/constelliabot/commands/strings/EbieKonRenCmd.java @@ -5,14 +5,25 @@ import tech.nevets.constelliabot.commands.CommandContext; import tech.nevets.constelliabot.commands.ICommand; import java.util.List; +import java.util.Random; public class EbieKonRenCmd implements ICommand { @Override public void handle(CommandContext ctx) { - ctx.getChannel().sendTyping().queue(); - ctx.getChannel().sendMessage("Hmm I wonder what this command does?").queue(); - ctx.getChannel().sendMessage("-EbieKonRen").queue(); + Random r = new Random(); + int max = 2; + + int i = r.nextInt(max); + if (i == 0) { + ctx.getChannel().sendTyping().queue(); + ctx.getChannel().sendMessage("*proceeds to run every command the bot has*").queue(); + ctx.getChannel().sendMessage("-EbieKonRen").queue(); + } else { + ctx.getChannel().sendTyping().queue(); + ctx.getChannel().sendMessage("Hmm I wonder what this command does?").queue(); + ctx.getChannel().sendMessage("-EbieKonRen").queue(); + } } @Override diff --git a/src/main/java/tech/nevets/constelliabot/commands/strings/JangoTheSovietCmd.java b/src/main/java/tech/nevets/constelliabot/commands/strings/JangoTheSovietCmd.java new file mode 100644 index 0000000..ace1101 --- /dev/null +++ b/src/main/java/tech/nevets/constelliabot/commands/strings/JangoTheSovietCmd.java @@ -0,0 +1,42 @@ +package tech.nevets.constelliabot.commands.strings; + +import tech.nevets.constelliabot.Bot; +import tech.nevets.constelliabot.commands.CommandContext; +import tech.nevets.constelliabot.commands.ICommand; + +import java.util.List; +import java.util.Random; + +public class JangoTheSovietCmd implements ICommand { + + @Override + public void handle(CommandContext ctx) { + Random r = new Random(); + int max = 2; + + int i = r.nextInt(max); + if (i == 0) { + ctx.getChannel().sendTyping().queue(); + ctx.getChannel().sendMessage("JOIN THE CSE!").queue(); + } else { + ctx.getChannel().sendTyping().queue(); + ctx.getChannel().sendMessage("Praise be it thy Spruce").queue(); + } + } + + @Override + public String getName() { + return "jangothesoviet"; + } + + @Override + public String getHelp() { + return "Sends a good morning message\n" + + "Usage: `" + Bot.prefix + "jangothesoviet`"; + } + + @Override + public List getAliases() { + return List.of("jango", "cse", "spruce"); + } +}