diff --git a/src/main/java/handiebot/command/CommandHandler.java b/src/main/java/handiebot/command/CommandHandler.java index 88d9a9d..ad68b2f 100644 --- a/src/main/java/handiebot/command/CommandHandler.java +++ b/src/main/java/handiebot/command/CommandHandler.java @@ -63,6 +63,14 @@ public class CommandHandler { this.bot.getMusicPlayer().quit(guild); } else if (command.equals("playlist")){ //Do playlist actions. + //TODO perform actions! + } else if (command.equals("prefix") && args.length == 1){ + //Set the prefix to the first argument. + if (args[0].length() != 1){ + new DisappearingMessage(channel, "You may only set the prefix to 1 character. To do otherwise is simply foolish.", 3000); + } else { + setPrefix(args[0]); + } } } } @@ -121,7 +129,7 @@ public class CommandHandler { * Sets the prefix used to identify commands. * @param prefix The prefix appended to the beginning of commands. */ - public void setPrefix(String prefix){ + public static void setPrefix(String prefix){ PREFIX = prefix; } diff --git a/src/main/java/handiebot/view/View.form b/src/main/java/handiebot/view/View.form new file mode 100644 index 0000000..3fc93a6 --- /dev/null +++ b/src/main/java/handiebot/view/View.form @@ -0,0 +1,49 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/src/main/java/handiebot/view/View.java b/src/main/java/handiebot/view/View.java new file mode 100644 index 0000000..1644382 --- /dev/null +++ b/src/main/java/handiebot/view/View.java @@ -0,0 +1,12 @@ +package handiebot.view; + +import javax.swing.*; + +/** + * @author Andrew Lalis + */ +public class View { + private JPanel panel1; + private JTextArea outputArea; + private JTextField commandField; +}