slightly better organization

This commit is contained in:
Harrison Deng 2017-08-17 15:36:26 -05:00
parent 5ffce1dc5b
commit 518185d9c0

View File

@ -26,10 +26,13 @@ public class MessageListener extends ListenerAdapter {
String msg = message.getContent();
if (msg.equals(z10b.cmdPrefix)) {
channel.sendMessage("Fool! Your doing it all wrong. You need an actual command after that.").queue();
} else if (msg.equalsIgnoreCase("ping") || msg.equalsIgnoreCase(z10b.cmdPrefix+"ping")) {
} else if (msg.equalsIgnoreCase("ping") || msg.substring(z10b.cmdPrefix.length()).equalsIgnoreCase("ping")) {
channel.sendMessage("pong").queue();
} else if (msg.startsWith(z10b.cmdPrefix)) {
if (msg.substring(z10b.cmdPrefix.length()).equalsIgnoreCase("roll")) {
msg = msg.substring(z10b.cmdPrefix.length());
if (msg.equalsIgnoreCase("ping")) {
int roll = rand.nextInt(6) + 1;
channel.sendMessage("Your roll: " + roll).queue(sentMessage -> {
@ -45,6 +48,8 @@ public class MessageListener extends ListenerAdapter {
}
});
}
} else if (msg.toLowerCase().contains("polyjet")) {
int msgID = rand.nextInt(5);