diff --git a/pom.xml b/pom.xml
index c386a89..996abd4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,6 +9,8 @@
1.0
+ UTF-8
+ UTF-8
8
8
@@ -21,24 +23,25 @@
org.apache.maven.plugins
maven-shade-plugin
3.2.4
+
+
+
+ *:*
+
+ module-info.class
+ META-INF/**
+
+
+
+ false
+ true
+
package
shade
-
- false
-
-
- *:*
-
- META-INF/**
-
-
-
- true
-
diff --git a/src/main/java/net/tylermurphy/ken/Ken.java b/src/main/java/net/tylermurphy/ken/Ken.java
index 0481bb6..dbdca83 100644
--- a/src/main/java/net/tylermurphy/ken/Ken.java
+++ b/src/main/java/net/tylermurphy/ken/Ken.java
@@ -39,7 +39,7 @@ public class Ken {
this.log = LoggerFactory.getLogger(Ken.class);
try {
api = JDABuilder.createDefault(config.getString("botToken"))
- .setActivity(Activity.playing("Use "+config.getString("prefix")+"help"))
+ .setActivity(Activity.playing("@Ken | /help"))
.setMemberCachePolicy(MemberCachePolicy.ALL)
.enableIntents(GatewayIntent.GUILD_MEMBERS)
.build()
diff --git a/src/main/java/net/tylermurphy/ken/api/E621API.java b/src/main/java/net/tylermurphy/ken/api/E621API.java
deleted file mode 100644
index 06aa02e..0000000
--- a/src/main/java/net/tylermurphy/ken/api/E621API.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package net.tylermurphy.ken.api;
-
-import net.tylermurphy.ken.api.wrapper.HTTPMethod;
-import net.tylermurphy.ken.api.wrapper.JsonRequest;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-public class E621API {
-
- public static String request(String query){
- JSONObject json = (JSONObject) new JsonRequest()
- .setURL("https://e621.net/posts.json?tags="+query)
- .setType(HTTPMethod.GET)
- .request();
- try {
- System.out.println(json.toString());
- JSONArray results = json.getJSONArray("posts");
- int choice = (int) (Math.random()*results.length()-1);
- JSONObject post = (JSONObject) results.get(choice);
- JSONObject file = post.getJSONObject("file");
- return file.getString("url");
- } catch (JSONException e) {
- return null;
- }
- }
-
-}
diff --git a/src/main/java/net/tylermurphy/ken/api/wrapper/HTTPMethod.java b/src/main/java/net/tylermurphy/ken/api/HTTPMethod.java
similarity index 62%
rename from src/main/java/net/tylermurphy/ken/api/wrapper/HTTPMethod.java
rename to src/main/java/net/tylermurphy/ken/api/HTTPMethod.java
index 094a8c6..e2f29a1 100644
--- a/src/main/java/net/tylermurphy/ken/api/wrapper/HTTPMethod.java
+++ b/src/main/java/net/tylermurphy/ken/api/HTTPMethod.java
@@ -1,4 +1,4 @@
-package net.tylermurphy.ken.api.wrapper;
+package net.tylermurphy.ken.api;
public enum HTTPMethod {
diff --git a/src/main/java/net/tylermurphy/ken/api/wrapper/JsonRequest.java b/src/main/java/net/tylermurphy/ken/api/JsonRequest.java
similarity index 96%
rename from src/main/java/net/tylermurphy/ken/api/wrapper/JsonRequest.java
rename to src/main/java/net/tylermurphy/ken/api/JsonRequest.java
index f95d23f..59b9991 100644
--- a/src/main/java/net/tylermurphy/ken/api/wrapper/JsonRequest.java
+++ b/src/main/java/net/tylermurphy/ken/api/JsonRequest.java
@@ -1,4 +1,4 @@
-package net.tylermurphy.ken.api.wrapper;
+package net.tylermurphy.ken.api;
import org.json.JSONException;
import org.json.JSONObject;
diff --git a/src/main/java/net/tylermurphy/ken/api/wrapper/Request.java b/src/main/java/net/tylermurphy/ken/api/Request.java
similarity index 98%
rename from src/main/java/net/tylermurphy/ken/api/wrapper/Request.java
rename to src/main/java/net/tylermurphy/ken/api/Request.java
index a5b8e4d..9da2061 100644
--- a/src/main/java/net/tylermurphy/ken/api/wrapper/Request.java
+++ b/src/main/java/net/tylermurphy/ken/api/Request.java
@@ -1,4 +1,4 @@
-package net.tylermurphy.ken.api.wrapper;
+package net.tylermurphy.ken.api;
import java.io.OutputStream;
import java.net.HttpURLConnection;
diff --git a/src/main/java/net/tylermurphy/ken/api/Rule34API.java b/src/main/java/net/tylermurphy/ken/api/Rule34API.java
deleted file mode 100644
index 3c78522..0000000
--- a/src/main/java/net/tylermurphy/ken/api/Rule34API.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package net.tylermurphy.ken.api;
-
-import net.tylermurphy.ken.api.wrapper.HTTPMethod;
-import net.tylermurphy.ken.api.wrapper.XmlRequest;
-import org.json.JSONException;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-public class Rule34API {
-
- public static String request(String query){
- Document doc = (Document) new XmlRequest()
- .setURL("https://rule34.xxx/index.php?page=dapi&s=post&q=index&tags="+ query)
- .setType(HTTPMethod.GET)
- .request();
- try {
- NodeList nList = doc.getElementsByTagName("post");
- int choice = (int) (Math.random()*nList.getLength()-1);
- if(choice < 0) return null;
- Node node = nList.item(choice);
- Element element = (Element) node;
- return element.getAttribute("file_url");
- } catch (JSONException e) {
- return null;
- }
- }
-
-}
diff --git a/src/main/java/net/tylermurphy/ken/api/wrapper/XmlRequest.java b/src/main/java/net/tylermurphy/ken/api/XmlRequest.java
similarity index 96%
rename from src/main/java/net/tylermurphy/ken/api/wrapper/XmlRequest.java
rename to src/main/java/net/tylermurphy/ken/api/XmlRequest.java
index 80a755a..e82603d 100644
--- a/src/main/java/net/tylermurphy/ken/api/wrapper/XmlRequest.java
+++ b/src/main/java/net/tylermurphy/ken/api/XmlRequest.java
@@ -1,4 +1,4 @@
-package net.tylermurphy.ken.api.wrapper;
+package net.tylermurphy.ken.api;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;
diff --git a/src/main/java/net/tylermurphy/ken/command/Responder.java b/src/main/java/net/tylermurphy/ken/command/Responder.java
index 2a00ee0..edd7317 100644
--- a/src/main/java/net/tylermurphy/ken/command/Responder.java
+++ b/src/main/java/net/tylermurphy/ken/command/Responder.java
@@ -10,10 +10,12 @@ import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEve
import net.dv8tion.jda.api.events.interaction.component.ButtonInteractionEvent;
import net.dv8tion.jda.api.hooks.ListenerAdapter;
import net.dv8tion.jda.api.interactions.commands.build.Commands;
+import net.dv8tion.jda.api.interactions.commands.build.OptionData;
import net.dv8tion.jda.api.interactions.commands.build.SlashCommandData;
import net.dv8tion.jda.api.interactions.components.buttons.Button;
import net.dv8tion.jda.api.requests.restaction.WebhookMessageAction;
import net.tylermurphy.ken.Ken;
+import net.tylermurphy.ken.util.*;
import org.reflections.Reflections;
import org.reflections.scanners.MethodAnnotationsScanner;
@@ -63,6 +65,19 @@ public class Responder extends ListenerAdapter {
Option option = method.getAnnotation(Option.class);
data = data.addOption(option.type(), option.name(), option.description(), option.required());
}
+ if(method.isAnnotationPresent(Selections.class)){
+ Selection[] selections = method.getAnnotation(Selections.class).value();
+ for(Selection selection : selections){
+ OptionData optionData = new OptionData(selection.type(), selection.name(), selection.description(), selection.required());
+ Arrays.stream(selection.choices()).forEach(choice -> optionData.addChoice(choice, choice.toLowerCase(Locale.ROOT)));
+ data.addOptions(optionData);
+ }
+ } else if(method.isAnnotationPresent(Selection.class)){
+ Selection selection = method.getAnnotation(Selection.class);
+ OptionData optionData = new OptionData(selection.type(), selection.name(), selection.description(), selection.required());
+ Arrays.stream(selection.choices()).forEach(choice -> optionData.addChoice(choice, choice.toLowerCase(Locale.ROOT)));
+ data.addOptions(optionData);
+ }
api.upsertCommand(data).queue();
}
diff --git a/src/main/java/net/tylermurphy/ken/command/fun/Dice.java b/src/main/java/net/tylermurphy/ken/command/fun/Dice.java
index 8bce8bf..54ece6d 100644
--- a/src/main/java/net/tylermurphy/ken/command/fun/Dice.java
+++ b/src/main/java/net/tylermurphy/ken/command/fun/Dice.java
@@ -4,8 +4,8 @@ import net.dv8tion.jda.api.EmbedBuilder;
import net.dv8tion.jda.api.entities.Member;
import net.dv8tion.jda.api.interactions.commands.OptionType;
import net.tylermurphy.ken.Ken;
-import net.tylermurphy.ken.command.Command;
-import net.tylermurphy.ken.command.Option;
+import net.tylermurphy.ken.util.Command;
+import net.tylermurphy.ken.util.Option;
import net.tylermurphy.ken.command.Response;
import java.util.List;
diff --git a/src/main/java/net/tylermurphy/ken/command/fun/Eject.java b/src/main/java/net/tylermurphy/ken/command/fun/Eject.java
index 48a5991..996f228 100644
--- a/src/main/java/net/tylermurphy/ken/command/fun/Eject.java
+++ b/src/main/java/net/tylermurphy/ken/command/fun/Eject.java
@@ -2,8 +2,8 @@ package net.tylermurphy.ken.command.fun;
import net.dv8tion.jda.api.entities.Member;
import net.dv8tion.jda.api.interactions.commands.OptionType;
-import net.tylermurphy.ken.command.Command;
-import net.tylermurphy.ken.command.Option;
+import net.tylermurphy.ken.util.Command;
+import net.tylermurphy.ken.util.Option;
import net.tylermurphy.ken.command.Response;
import net.tylermurphy.ken.image.GifFactory;
diff --git a/src/main/java/net/tylermurphy/ken/command/main/Help.java b/src/main/java/net/tylermurphy/ken/command/main/Help.java
new file mode 100644
index 0000000..08a97f4
--- /dev/null
+++ b/src/main/java/net/tylermurphy/ken/command/main/Help.java
@@ -0,0 +1,90 @@
+package net.tylermurphy.ken.command.main;
+
+import net.dv8tion.jda.api.EmbedBuilder;
+import net.dv8tion.jda.api.entities.Member;
+import net.dv8tion.jda.api.entities.Message;
+import net.dv8tion.jda.api.entities.MessageEmbed;
+import net.tylermurphy.ken.Ken;
+import net.tylermurphy.ken.util.ButtonCallback;
+import net.tylermurphy.ken.util.Command;
+import net.tylermurphy.ken.command.Response;
+
+public class Help {
+
+ private final int PAGES = 5;
+
+ @Command(name="help", description="Gets information about all the commands in the plugin")
+ public Response execute(Member sender){
+ return Response.success(getPage(sender, 1)).addSecondaryButton("help", "previous", "Previous").addSecondaryButton("help", "next", "Next");
+ }
+
+ @ButtonCallback(name="help")
+ public Response onButton(String id, Message message, Member sender){
+ int page;
+ int pages = PAGES;
+ if (message != null && message.getEmbeds().size() > 0 && message.getEmbeds().get(0) != null) {
+ page = Integer.parseInt(message.getEmbeds().get(0).getFooter().getText().split("/")[0].substring(5));
+ } else {
+ page = 0;
+ }
+ if(id.equals("previous"))
+ page = page - 1 < 1 ? pages : page - 1;
+ else
+ page = page + 1 > pages ? 1 : page + 1;
+ return Response.success(getPage(sender, page));
+ }
+
+ private MessageEmbed getPage(Member sender, int page) {
+ String name = Ken.getInstance().getConfig().getString("botName");
+ String supportServer = Ken.getInstance().getConfig().getString("supportServer");
+ EmbedBuilder[] embeds = new EmbedBuilder[]{
+ Ken.getInstance().getDefaultEmbed()
+ .setAuthor(name + " Command List", sender.getAvatarUrl())
+ .appendDescription(
+ "These are all the commands that are included with "+name+"\n" +
+ "Read below to see what each command does, and what parameters the\n" +
+ "command requires. Any questions? Join our [discord support server](https://discord.gg/"+supportServer+")"
+ ).setFooter("Page "+page+"/"+PAGES),
+ Ken.getInstance().getDefaultEmbed()
+ .setAuthor(name + " Command List", sender.getAvatarUrl())
+ .setTitle(":pen_ballpoint: **Main Commands**")
+ .appendDescription("**/help** Gives a list of commands\n")
+ .appendDescription("**/purge ** Purges an amount of messages from a channel\n")
+ .setFooter("Page "+page+"/"+PAGES),
+ Ken.getInstance().getDefaultEmbed()
+ .setAuthor(name + " Command List", sender.getAvatarUrl())
+ .setTitle(":musical_note: **Music Commands**")
+ .appendDescription("**/play ** Plays a song in a voice channel\n")
+ .appendDescription("**/join** Make the bot join your audio channel\n")
+ .appendDescription("**/leave** Make the bot leave your audio channel\n")
+ .appendDescription("**/pause** Pause the current playing track\n")
+ .appendDescription("**/resume** Resume the current paused track\n")
+ .appendDescription("**/stop** Stop the current playing track and clear queue\n")
+ .appendDescription("**/skip** Vote to skip the current track\n")
+ .appendDescription("**/forceskip** Force skip the current track\n")
+ .appendDescription("**/loop** Loop the current track\n")
+ .appendDescription("**/loopqueue** Loop the current song queue\n")
+ .appendDescription("**/remove ** Remove a song from the queue\n")
+ .appendDescription("**/nowplaying** See what track is currently playing\n")
+ .appendDescription("**/queue** View the current song queue\n")
+ .setFooter("Page "+page+"/"+PAGES),
+ Ken.getInstance().getDefaultEmbed()
+ .setAuthor(name + " Command List", sender.getAvatarUrl())
+ .setTitle(":game_die: **Game Commands**")
+ .appendDescription("**/d6** Roll a d6 die\n")
+ .appendDescription("**/d8** Roll a d8 die\n")
+ .appendDescription("**/d12** Roll a d12 die\n")
+ .appendDescription("**/d20** Roll a d20 die\n")
+ .appendDescription("**/dice ** Roll a dice with set sides\n")
+ .setFooter("Page "+page+"/"+PAGES),
+ Ken.getInstance().getDefaultEmbed()
+ .setAuthor(name + " Command List", sender.getAvatarUrl())
+ .setTitle(":underage: **NSFW Commands**")
+ .appendDescription("**/rule34 ** Search on rule34\n")
+ .appendDescription("**/e612 ** Search on e621\n")
+ .setFooter("Page "+page+"/"+PAGES)
+ };
+ return embeds[page-1].build();
+ }
+
+}
diff --git a/src/main/java/net/tylermurphy/ken/command/util/Purge.java b/src/main/java/net/tylermurphy/ken/command/main/Purge.java
similarity index 87%
rename from src/main/java/net/tylermurphy/ken/command/util/Purge.java
rename to src/main/java/net/tylermurphy/ken/command/main/Purge.java
index 416730f..233c714 100644
--- a/src/main/java/net/tylermurphy/ken/command/util/Purge.java
+++ b/src/main/java/net/tylermurphy/ken/command/main/Purge.java
@@ -1,13 +1,13 @@
-package net.tylermurphy.ken.command.util;
+package net.tylermurphy.ken.command.main;
import net.dv8tion.jda.api.Permission;
import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.entities.GuildMessageChannel;
import net.dv8tion.jda.api.entities.Message;
import net.dv8tion.jda.api.interactions.commands.OptionType;
-import net.tylermurphy.ken.command.Command;
-import net.tylermurphy.ken.command.Option;
-import net.tylermurphy.ken.command.Requirement;
+import net.tylermurphy.ken.util.Command;
+import net.tylermurphy.ken.util.Option;
+import net.tylermurphy.ken.util.Requirement;
import net.tylermurphy.ken.command.Response;
import java.util.List;
diff --git a/src/main/java/net/tylermurphy/ken/command/music/ForceSkip.java b/src/main/java/net/tylermurphy/ken/command/music/ForceSkip.java
index 656e3e9..aea0901 100644
--- a/src/main/java/net/tylermurphy/ken/command/music/ForceSkip.java
+++ b/src/main/java/net/tylermurphy/ken/command/music/ForceSkip.java
@@ -5,7 +5,7 @@ import com.sedmelluq.discord.lavaplayer.track.AudioTrack;
import net.dv8tion.jda.api.entities.*;
import net.dv8tion.jda.api.managers.AudioManager;
import net.tylermurphy.ken.Ken;
-import net.tylermurphy.ken.command.Command;
+import net.tylermurphy.ken.util.Command;
import net.tylermurphy.ken.command.Response;
import net.tylermurphy.ken.music.GuildMusicManager;
import net.tylermurphy.ken.music.MusicPermissions;
diff --git a/src/main/java/net/tylermurphy/ken/command/music/Join.java b/src/main/java/net/tylermurphy/ken/command/music/Join.java
index 217e049..72156c6 100644
--- a/src/main/java/net/tylermurphy/ken/command/music/Join.java
+++ b/src/main/java/net/tylermurphy/ken/command/music/Join.java
@@ -4,7 +4,7 @@ import net.dv8tion.jda.api.Permission;
import net.dv8tion.jda.api.entities.*;
import net.dv8tion.jda.api.managers.AudioManager;
import net.tylermurphy.ken.Ken;
-import net.tylermurphy.ken.command.Command;
+import net.tylermurphy.ken.util.Command;
import net.tylermurphy.ken.command.Response;
import net.tylermurphy.ken.music.GuildMusicManager;
import net.tylermurphy.ken.music.MusicPermissions;
diff --git a/src/main/java/net/tylermurphy/ken/command/music/Leave.java b/src/main/java/net/tylermurphy/ken/command/music/Leave.java
index 1f07901..bb85303 100644
--- a/src/main/java/net/tylermurphy/ken/command/music/Leave.java
+++ b/src/main/java/net/tylermurphy/ken/command/music/Leave.java
@@ -4,7 +4,7 @@ import net.dv8tion.jda.api.entities.AudioChannel;
import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.entities.Member;
import net.dv8tion.jda.api.managers.AudioManager;
-import net.tylermurphy.ken.command.Command;
+import net.tylermurphy.ken.util.Command;
import net.tylermurphy.ken.command.Response;
import net.tylermurphy.ken.music.MusicPermissions;
diff --git a/src/main/java/net/tylermurphy/ken/command/music/Loop.java b/src/main/java/net/tylermurphy/ken/command/music/Loop.java
index 65b31d3..463db3f 100644
--- a/src/main/java/net/tylermurphy/ken/command/music/Loop.java
+++ b/src/main/java/net/tylermurphy/ken/command/music/Loop.java
@@ -6,7 +6,7 @@ import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.entities.Member;
import net.dv8tion.jda.api.managers.AudioManager;
import net.tylermurphy.ken.Ken;
-import net.tylermurphy.ken.command.Command;
+import net.tylermurphy.ken.util.Command;
import net.tylermurphy.ken.command.Response;
import net.tylermurphy.ken.music.GuildMusicManager;
import net.tylermurphy.ken.music.MusicPermissions;
diff --git a/src/main/java/net/tylermurphy/ken/command/music/LoopQueue.java b/src/main/java/net/tylermurphy/ken/command/music/LoopQueue.java
index 6cd79b7..3d160fc 100644
--- a/src/main/java/net/tylermurphy/ken/command/music/LoopQueue.java
+++ b/src/main/java/net/tylermurphy/ken/command/music/LoopQueue.java
@@ -6,7 +6,7 @@ import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.entities.Member;
import net.dv8tion.jda.api.managers.AudioManager;
import net.tylermurphy.ken.Ken;
-import net.tylermurphy.ken.command.Command;
+import net.tylermurphy.ken.util.Command;
import net.tylermurphy.ken.command.Response;
import net.tylermurphy.ken.music.GuildMusicManager;
import net.tylermurphy.ken.music.MusicPermissions;
diff --git a/src/main/java/net/tylermurphy/ken/command/music/NowPlaying.java b/src/main/java/net/tylermurphy/ken/command/music/NowPlaying.java
index 97ebd38..382a258 100644
--- a/src/main/java/net/tylermurphy/ken/command/music/NowPlaying.java
+++ b/src/main/java/net/tylermurphy/ken/command/music/NowPlaying.java
@@ -6,7 +6,7 @@ import net.dv8tion.jda.api.EmbedBuilder;
import net.dv8tion.jda.api.entities.*;
import net.dv8tion.jda.api.managers.AudioManager;
import net.tylermurphy.ken.Ken;
-import net.tylermurphy.ken.command.Command;
+import net.tylermurphy.ken.util.Command;
import net.tylermurphy.ken.command.Response;
import net.tylermurphy.ken.music.GuildMusicManager;
import net.tylermurphy.ken.music.PlayerManager;
diff --git a/src/main/java/net/tylermurphy/ken/command/music/Pause.java b/src/main/java/net/tylermurphy/ken/command/music/Pause.java
index 5077e2a..d8afab7 100644
--- a/src/main/java/net/tylermurphy/ken/command/music/Pause.java
+++ b/src/main/java/net/tylermurphy/ken/command/music/Pause.java
@@ -6,7 +6,7 @@ import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.entities.Member;
import net.dv8tion.jda.api.managers.AudioManager;
import net.tylermurphy.ken.Ken;
-import net.tylermurphy.ken.command.Command;
+import net.tylermurphy.ken.util.Command;
import net.tylermurphy.ken.command.Response;
import net.tylermurphy.ken.music.GuildMusicManager;
import net.tylermurphy.ken.music.MusicPermissions;
diff --git a/src/main/java/net/tylermurphy/ken/command/music/Play.java b/src/main/java/net/tylermurphy/ken/command/music/Play.java
index e32333c..e4341f2 100644
--- a/src/main/java/net/tylermurphy/ken/command/music/Play.java
+++ b/src/main/java/net/tylermurphy/ken/command/music/Play.java
@@ -6,8 +6,8 @@ import net.dv8tion.jda.api.entities.*;
import net.dv8tion.jda.api.interactions.commands.OptionType;
import net.dv8tion.jda.api.managers.AudioManager;
import net.tylermurphy.ken.Ken;
-import net.tylermurphy.ken.command.Command;
-import net.tylermurphy.ken.command.Option;
+import net.tylermurphy.ken.util.Command;
+import net.tylermurphy.ken.util.Option;
import net.tylermurphy.ken.command.Response;
import net.tylermurphy.ken.music.PlayerManager;
diff --git a/src/main/java/net/tylermurphy/ken/command/music/Queue.java b/src/main/java/net/tylermurphy/ken/command/music/Queue.java
index f96815f..32d2fc2 100644
--- a/src/main/java/net/tylermurphy/ken/command/music/Queue.java
+++ b/src/main/java/net/tylermurphy/ken/command/music/Queue.java
@@ -6,10 +6,9 @@ import net.dv8tion.jda.api.EmbedBuilder;
import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.entities.Message;
import net.dv8tion.jda.api.entities.MessageEmbed;
-import net.dv8tion.jda.api.interactions.components.buttons.Button;
import net.tylermurphy.ken.Ken;
-import net.tylermurphy.ken.command.ButtonCallback;
-import net.tylermurphy.ken.command.Command;
+import net.tylermurphy.ken.util.ButtonCallback;
+import net.tylermurphy.ken.util.Command;
import net.tylermurphy.ken.command.Response;
import net.tylermurphy.ken.music.GuildMusicManager;
import net.tylermurphy.ken.music.PlayerManager;
@@ -36,7 +35,7 @@ public class Queue {
PlayerManager playerManager = Ken.getInstance().getPlayerManager();
GuildMusicManager musicManager = playerManager.getGuildMusicManager(guild);
int page, pages;
- if (message != null && message.getEmbeds().get(0) != null) {
+ if (message != null && message.getEmbeds().size() > 0 && message.getEmbeds().get(0) != null) {
page = Integer.parseInt(message.getEmbeds().get(0).getFooter().getText().split("/")[0].substring(5));
pages = Integer.parseInt(message.getEmbeds().get(0).getFooter().getText().split("/")[1]);
} else {
diff --git a/src/main/java/net/tylermurphy/ken/command/music/Remove.java b/src/main/java/net/tylermurphy/ken/command/music/Remove.java
index 3457767..5eaffb6 100644
--- a/src/main/java/net/tylermurphy/ken/command/music/Remove.java
+++ b/src/main/java/net/tylermurphy/ken/command/music/Remove.java
@@ -7,8 +7,8 @@ import net.dv8tion.jda.api.entities.Member;
import net.dv8tion.jda.api.interactions.commands.OptionType;
import net.dv8tion.jda.api.managers.AudioManager;
import net.tylermurphy.ken.Ken;
-import net.tylermurphy.ken.command.Command;
-import net.tylermurphy.ken.command.Option;
+import net.tylermurphy.ken.util.Command;
+import net.tylermurphy.ken.util.Option;
import net.tylermurphy.ken.command.Response;
import net.tylermurphy.ken.music.GuildMusicManager;
import net.tylermurphy.ken.music.MusicPermissions;
diff --git a/src/main/java/net/tylermurphy/ken/command/music/Resume.java b/src/main/java/net/tylermurphy/ken/command/music/Resume.java
index c74e909..b7b8f6a 100644
--- a/src/main/java/net/tylermurphy/ken/command/music/Resume.java
+++ b/src/main/java/net/tylermurphy/ken/command/music/Resume.java
@@ -6,7 +6,7 @@ import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.entities.Member;
import net.dv8tion.jda.api.managers.AudioManager;
import net.tylermurphy.ken.Ken;
-import net.tylermurphy.ken.command.Command;
+import net.tylermurphy.ken.util.Command;
import net.tylermurphy.ken.command.Response;
import net.tylermurphy.ken.music.GuildMusicManager;
import net.tylermurphy.ken.music.MusicPermissions;
diff --git a/src/main/java/net/tylermurphy/ken/command/music/Skip.java b/src/main/java/net/tylermurphy/ken/command/music/Skip.java
index a82e0d5..1fdbf2a 100644
--- a/src/main/java/net/tylermurphy/ken/command/music/Skip.java
+++ b/src/main/java/net/tylermurphy/ken/command/music/Skip.java
@@ -8,7 +8,7 @@ import net.dv8tion.jda.api.entities.GuildMessageChannel;
import net.dv8tion.jda.api.entities.Member;
import net.dv8tion.jda.api.managers.AudioManager;
import net.tylermurphy.ken.Ken;
-import net.tylermurphy.ken.command.Command;
+import net.tylermurphy.ken.util.Command;
import net.tylermurphy.ken.command.Response;
import net.tylermurphy.ken.music.GuildMusicManager;
import net.tylermurphy.ken.music.PlayerManager;
diff --git a/src/main/java/net/tylermurphy/ken/command/music/Stop.java b/src/main/java/net/tylermurphy/ken/command/music/Stop.java
index b942561..29e196f 100644
--- a/src/main/java/net/tylermurphy/ken/command/music/Stop.java
+++ b/src/main/java/net/tylermurphy/ken/command/music/Stop.java
@@ -6,7 +6,7 @@ import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.entities.Member;
import net.dv8tion.jda.api.managers.AudioManager;
import net.tylermurphy.ken.Ken;
-import net.tylermurphy.ken.command.Command;
+import net.tylermurphy.ken.util.Command;
import net.tylermurphy.ken.command.Response;
import net.tylermurphy.ken.music.GuildMusicManager;
import net.tylermurphy.ken.music.MusicPermissions;
diff --git a/src/main/java/net/tylermurphy/ken/command/nsfw/Akaneko.java b/src/main/java/net/tylermurphy/ken/command/nsfw/Akaneko.java
new file mode 100644
index 0000000..648f9e1
--- /dev/null
+++ b/src/main/java/net/tylermurphy/ken/command/nsfw/Akaneko.java
@@ -0,0 +1,51 @@
+package net.tylermurphy.ken.command.nsfw;
+
+import net.dv8tion.jda.api.entities.GuildMessageChannel;
+import net.dv8tion.jda.api.entities.TextChannel;
+import net.dv8tion.jda.api.interactions.commands.OptionType;
+import net.tylermurphy.ken.Ken;
+import net.tylermurphy.ken.api.HTTPMethod;
+import net.tylermurphy.ken.api.JsonRequest;
+import net.tylermurphy.ken.command.Response;
+import net.tylermurphy.ken.util.Command;
+import net.tylermurphy.ken.util.Selection;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.List;
+
+public class Akaneko {
+
+ @Command(name="akaneko", description=":underage: Searches for an image off of akaneko")
+ @Selection(name="type", description="Type of post you want to get", type=OptionType.STRING, required=true, choices={"ass","bdsm","cum","hentai","femdom","doujin","maid","orgy","panties","nsfwwallpapers","nsfwmobilewallpapers","netorare","gifs","gif","blowjob","feet","pussy","uglybastard","uniform","gangbang","foxgirl","cumslut","glasses","thighs","tentacles","masturbation","school","yuri","succubus"})
+ public Response execute(GuildMessageChannel channel, List