Added Jango cmd and made ebie random

This commit is contained in:
Steven Tracey 2021-09-29 09:31:11 -04:00
parent 6c1e0ccc0d
commit c42453e3f7
3 changed files with 58 additions and 3 deletions

View File

@ -14,6 +14,7 @@ import tech.nevets.constelliabot.commands.pictures.FoxCmd;
import tech.nevets.constelliabot.commands.pictures.PandaCmd; import tech.nevets.constelliabot.commands.pictures.PandaCmd;
import tech.nevets.constelliabot.commands.strings.GoodMorningCmd; import tech.nevets.constelliabot.commands.strings.GoodMorningCmd;
import tech.nevets.constelliabot.commands.strings.EbieKonRenCmd; import tech.nevets.constelliabot.commands.strings.EbieKonRenCmd;
import tech.nevets.constelliabot.commands.strings.JangoTheSovietCmd;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.ArrayList; import java.util.ArrayList;
@ -35,6 +36,7 @@ public class CommandManager {
addCommand(new FoxCmd()); addCommand(new FoxCmd());
addCommand(new GoodMorningCmd()); addCommand(new GoodMorningCmd());
addCommand(new HelpCmd(this)); addCommand(new HelpCmd(this));
addCommand(new JangoTheSovietCmd());
//addCommand(new JoinCmd()); //addCommand(new JoinCmd());
addCommand(new PandaCmd()); addCommand(new PandaCmd());
addCommand(new PingCmd()); addCommand(new PingCmd());

View File

@ -5,15 +5,26 @@ import tech.nevets.constelliabot.commands.CommandContext;
import tech.nevets.constelliabot.commands.ICommand; import tech.nevets.constelliabot.commands.ICommand;
import java.util.List; import java.util.List;
import java.util.Random;
public class EbieKonRenCmd implements ICommand { public class EbieKonRenCmd implements ICommand {
@Override @Override
public void handle(CommandContext ctx) { 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("*proceeds to run every command the bot has*").queue();
ctx.getChannel().sendMessage("-EbieKonRen").queue();
} else {
ctx.getChannel().sendTyping().queue(); ctx.getChannel().sendTyping().queue();
ctx.getChannel().sendMessage("Hmm I wonder what this command does?").queue(); ctx.getChannel().sendMessage("Hmm I wonder what this command does?").queue();
ctx.getChannel().sendMessage("-EbieKonRen").queue(); ctx.getChannel().sendMessage("-EbieKonRen").queue();
} }
}
@Override @Override
public String getName() { public String getName() {

View File

@ -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<String> getAliases() {
return List.of("jango", "cse", "spruce");
}
}