diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..824067a3 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +.github/ +target/ +.idea/ diff --git a/src/main/java/com/bbn/hadder/Hadder.java b/src/main/java/com/bbn/hadder/Hadder.java index 71e75f9a..a88607e2 100644 --- a/src/main/java/com/bbn/hadder/Hadder.java +++ b/src/main/java/com/bbn/hadder/Hadder.java @@ -79,6 +79,12 @@ private static void startBot() { new GuildLeaveCommand(), new MemeCommand(), new InviteDetectCommand(), + new BDSMCommand(), + new FingeringCommand(), + new LickingCommand(), + new SpankCommand(), + new RandomPornCommand(), + new SoloCommand(), new LinkCommand()), config, helpCommand); builder.addEventListeners( @@ -87,7 +93,7 @@ private static void startBot() { new CommandListener(rethink, commandHandler), new GuildListener(rethink, config), new ReadyListener(rethink, config), - //new LinkListener(rethink), + // new LinkListener(rethink), new InviteLinkListener(rethink), new RulesListener(rethink)); diff --git a/src/main/java/com/bbn/hadder/commands/nsfw/AnalCommand.java b/src/main/java/com/bbn/hadder/commands/nsfw/AnalCommand.java index a053a87e..74faee46 100644 --- a/src/main/java/com/bbn/hadder/commands/nsfw/AnalCommand.java +++ b/src/main/java/com/bbn/hadder/commands/nsfw/AnalCommand.java @@ -10,6 +10,7 @@ import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; +import org.json.JSONObject; import java.io.IOException; @@ -20,12 +21,15 @@ public void executed(String[] args, CommandEvent event) { if (event.getTextChannel().isNSFW()) { OkHttpClient caller = new OkHttpClient(); - Request request = new Request.Builder().url("https://nekos.life/api/v2/img/anal").build(); + Request request = new Request.Builder().url("https://api.nekos.dev/api/v3/images/nsfw/gif/anal/").build(); try { Response response = caller.newCall(request).execute(); - String url = response.body().string().replace("{\"url\":\"", ""); + JSONObject json = new JSONObject(response.body().string()); + JSONObject data = json.getJSONObject("data"); + JSONObject response1 = data.getJSONObject("response"); + String url = response1.toString().replace("{\"url\":\"", ""); event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) .setAuthor("GIF not showing? Click here", url.replace("\"}", "")) diff --git a/src/main/java/com/bbn/hadder/commands/nsfw/BDSMCommand.java b/src/main/java/com/bbn/hadder/commands/nsfw/BDSMCommand.java new file mode 100644 index 00000000..602fd229 --- /dev/null +++ b/src/main/java/com/bbn/hadder/commands/nsfw/BDSMCommand.java @@ -0,0 +1,63 @@ +package com.bbn.hadder.commands.nsfw; + +/* + * @author Skidder / GregTCLTK + */ + +import com.bbn.hadder.commands.Command; +import com.bbn.hadder.commands.CommandEvent; +import com.bbn.hadder.utils.MessageEditor; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; +import org.json.JSONObject; + +import java.io.IOException; + +public class BDSMCommand implements Command { + + @Override + public void executed(String[] args, CommandEvent event) { + if (event.getTextChannel().isNSFW()) { + + OkHttpClient caller = new OkHttpClient(); + Request request = new Request.Builder().url("https://api.nekos.dev/api/v3/images/nsfw/img/bdsm_lewd").build(); + + try { + + Response response = caller.newCall(request).execute(); + JSONObject json = new JSONObject(response.body().string()); + JSONObject data = json.getJSONObject("data"); + JSONObject response1 = data.getJSONObject("response"); + String url = response1.toString().replace("{\"url\":\"", ""); + + event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) + .setAuthor("Image not showing? Click here", url.replace("\"}", "")) + .setImage(url.replace("\"}", "")) + .setFooter("BDSM") + .build()).queue(); + + } catch (IOException e) { + e.printStackTrace(); + } + + } else { + event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING).setTitle("No NSFW").setDescription("You can only execute this command in NSFW channels!").build()).queue(); + } + } + + @Override + public String[] labels() { + return new String[]{"bdsm"}; + } + + @Override + public String description() { + return "Shows a random bdsm picture."; + } + + @Override + public String usage() { + return ""; + } +} diff --git a/src/main/java/com/bbn/hadder/commands/nsfw/BoobsCommand.java b/src/main/java/com/bbn/hadder/commands/nsfw/BoobsCommand.java index 3b74e25d..90625b43 100644 --- a/src/main/java/com/bbn/hadder/commands/nsfw/BoobsCommand.java +++ b/src/main/java/com/bbn/hadder/commands/nsfw/BoobsCommand.java @@ -10,6 +10,7 @@ import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; +import org.json.JSONObject; import java.io.IOException; @@ -20,12 +21,15 @@ public void executed(String[] args, CommandEvent event) { if (event.getTextChannel().isNSFW()) { OkHttpClient caller = new OkHttpClient(); - Request request = new Request.Builder().url("https://nekos.life/api/v2/img/boobs").build(); + Request request = new Request.Builder().url("https://api.nekos.dev/api/v3/images/nsfw/gif/tits/").build(); try { Response response = caller.newCall(request).execute(); - String url = response.body().string().replace("{\"url\":\"", ""); + JSONObject json = new JSONObject(response.body().string()); + JSONObject data = json.getJSONObject("data"); + JSONObject response1 = data.getJSONObject("response"); + String url = response1.toString().replace("{\"url\":\"", ""); event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) .setAuthor("GIF not showing? Click here", url.replace("\"}", "")) @@ -44,7 +48,7 @@ public void executed(String[] args, CommandEvent event) { @Override public String[] labels() { - return new String[]{"boobs"}; + return new String[]{"boobs", "boob", "tits"}; } @Override diff --git a/src/main/java/com/bbn/hadder/commands/nsfw/CumCommand.java b/src/main/java/com/bbn/hadder/commands/nsfw/CumCommand.java index acb2da98..1bfae5ed 100644 --- a/src/main/java/com/bbn/hadder/commands/nsfw/CumCommand.java +++ b/src/main/java/com/bbn/hadder/commands/nsfw/CumCommand.java @@ -10,6 +10,7 @@ import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; +import org.json.JSONObject; import java.io.IOException; @@ -20,12 +21,15 @@ public void executed(String[] args, CommandEvent event) { if (event.getTextChannel().isNSFW()) { OkHttpClient caller = new OkHttpClient(); - Request request = new Request.Builder().url("https://nekos.life/api/v2/img/cum").build(); + Request request = new Request.Builder().url("https://api.nekos.dev/api/v3/images/nsfw/gif/cum/").build(); try { Response response = caller.newCall(request).execute(); - String url = response.body().string().replace("{\"url\":\"", ""); + JSONObject json = new JSONObject(response.body().string()); + JSONObject data = json.getJSONObject("data"); + JSONObject response1 = data.getJSONObject("response"); + String url = response1.toString().replace("{\"url\":\"", ""); event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) .setAuthor("GIF not showing? Click here", url.replace("\"}", "")) diff --git a/src/main/java/com/bbn/hadder/commands/nsfw/FeetCommand.java b/src/main/java/com/bbn/hadder/commands/nsfw/FeetCommand.java index 8a55c836..8f99c18e 100644 --- a/src/main/java/com/bbn/hadder/commands/nsfw/FeetCommand.java +++ b/src/main/java/com/bbn/hadder/commands/nsfw/FeetCommand.java @@ -10,6 +10,7 @@ import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; +import org.json.JSONObject; import java.io.IOException; @@ -20,15 +21,18 @@ public void executed(String[] args, CommandEvent event) { if (event.getTextChannel().isNSFW()) { OkHttpClient caller = new OkHttpClient(); - Request request = new Request.Builder().url("https://nekos.life/api/v2/img/feet").build(); + Request request = new Request.Builder().url("https://api.nekos.dev/api/v3/images/nsfw/gif/feet/").build(); try { Response response = caller.newCall(request).execute(); - String url = response.body().string().replace("{\"url\":\"", ""); + JSONObject json = new JSONObject(response.body().string()); + JSONObject data = json.getJSONObject("data"); + JSONObject response1 = data.getJSONObject("response"); + String url = response1.toString().replace("{\"url\":\"", ""); event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) - .setAuthor("Image not showing? Click here", url.replace("\"}", "")) + .setAuthor("GIF not showing? Click here", url.replace("\"}", "")) .setImage(url.replace("\"}", "")) .setFooter("Feet") .build()).queue(); @@ -49,7 +53,7 @@ public String[] labels() { @Override public String description() { - return "Shows a random feet picture."; + return "Shows a random feet gif."; } @Override diff --git a/src/main/java/com/bbn/hadder/commands/nsfw/FingeringCommand.java b/src/main/java/com/bbn/hadder/commands/nsfw/FingeringCommand.java new file mode 100644 index 00000000..2e7f063f --- /dev/null +++ b/src/main/java/com/bbn/hadder/commands/nsfw/FingeringCommand.java @@ -0,0 +1,63 @@ +package com.bbn.hadder.commands.nsfw; + +/* + * @author Skidder / GregTCLTK + */ + +import com.bbn.hadder.commands.Command; +import com.bbn.hadder.commands.CommandEvent; +import com.bbn.hadder.utils.MessageEditor; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; +import org.json.JSONObject; + +import java.io.IOException; + +public class FingeringCommand implements Command { + + @Override + public void executed(String[] args, CommandEvent event) { + if (event.getTextChannel().isNSFW()) { + + OkHttpClient caller = new OkHttpClient(); + Request request = new Request.Builder().url("https://api.nekos.dev/api/v3/images/nsfw/gif/pussy_wank/").build(); + + try { + + Response response = caller.newCall(request).execute(); + JSONObject json = new JSONObject(response.body().string()); + JSONObject data = json.getJSONObject("data"); + JSONObject response1 = data.getJSONObject("response"); + String url = response1.toString().replace("{\"url\":\"", ""); + + event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) + .setAuthor("GIF not showing? Click here", url.replace("\"}", "")) + .setImage(url.replace("\"}", "")) + .setFooter("Fingering") + .build()).queue(); + + } catch (IOException e) { + e.printStackTrace(); + } + + } else { + event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING).setTitle("No NSFW").setDescription("You can only execute this command in NSFW channels!").build()).queue(); + } + } + + @Override + public String[] labels() { + return new String[]{"fingering"}; + } + + @Override + public String description() { + return "Shows a random fingering gif."; + } + + @Override + public String usage() { + return ""; + } +} diff --git a/src/main/java/com/bbn/hadder/commands/nsfw/LickingCommand.java b/src/main/java/com/bbn/hadder/commands/nsfw/LickingCommand.java new file mode 100644 index 00000000..439af12c --- /dev/null +++ b/src/main/java/com/bbn/hadder/commands/nsfw/LickingCommand.java @@ -0,0 +1,63 @@ +package com.bbn.hadder.commands.nsfw; + +/* + * @author Skidder / GregTCLTK + */ + +import com.bbn.hadder.commands.Command; +import com.bbn.hadder.commands.CommandEvent; +import com.bbn.hadder.utils.MessageEditor; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; +import org.json.JSONObject; + +import java.io.IOException; + +public class LickingCommand implements Command { + + @Override + public void executed(String[] args, CommandEvent event) { + if (event.getTextChannel().isNSFW()) { + + OkHttpClient caller = new OkHttpClient(); + Request request = new Request.Builder().url("https://api.nekos.dev/api/v3/images/nsfw/gif/kuni/").build(); + + try { + + Response response = caller.newCall(request).execute(); + JSONObject json = new JSONObject(response.body().string()); + JSONObject data = json.getJSONObject("data"); + JSONObject response1 = data.getJSONObject("response"); + String url = response1.toString().replace("{\"url\":\"", ""); + + event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) + .setAuthor("GIF not showing? Click here", url.replace("\"}", "")) + .setImage(url.replace("\"}", "")) + .setFooter("Licking") + .build()).queue(); + + } catch (IOException e) { + e.printStackTrace(); + } + + } else { + event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING).setTitle("No NSFW").setDescription("You can only execute this command in NSFW channels!").build()).queue(); + } + } + + @Override + public String[] labels() { + return new String[]{"licking"}; + } + + @Override + public String description() { + return "Shows a random licking gif."; + } + + @Override + public String usage() { + return ""; + } +} diff --git a/src/main/java/com/bbn/hadder/commands/nsfw/PornCommand.java b/src/main/java/com/bbn/hadder/commands/nsfw/PornCommand.java index a92b4b61..53faacd4 100644 --- a/src/main/java/com/bbn/hadder/commands/nsfw/PornCommand.java +++ b/src/main/java/com/bbn/hadder/commands/nsfw/PornCommand.java @@ -10,6 +10,7 @@ import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; +import org.json.JSONObject; import java.io.IOException; @@ -20,12 +21,15 @@ public void executed(String[] args, CommandEvent event) { if (event.getTextChannel().isNSFW()) { OkHttpClient caller = new OkHttpClient(); - Request request = new Request.Builder().url("https://nekos.life/api/v2/img/classic").build(); + Request request = new Request.Builder().url("https://api.nekos.dev/api/v3/images/nsfw/gif/classic/").build(); try { Response response = caller.newCall(request).execute(); - String url = response.body().string().replace("{\"url\":\"", ""); + JSONObject json = new JSONObject(response.body().string()); + JSONObject data = json.getJSONObject("data"); + JSONObject response1 = data.getJSONObject("response"); + String url = response1.toString().replace("{\"url\":\"", ""); event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) .setAuthor("GIF not showing? Click here", url.replace("\"}", "")) diff --git a/src/main/java/com/bbn/hadder/commands/nsfw/RandomPornCommand.java b/src/main/java/com/bbn/hadder/commands/nsfw/RandomPornCommand.java new file mode 100644 index 00000000..2cad8d7b --- /dev/null +++ b/src/main/java/com/bbn/hadder/commands/nsfw/RandomPornCommand.java @@ -0,0 +1,63 @@ +package com.bbn.hadder.commands.nsfw; + +/* + * @author Skidder / GregTCLTK + */ + +import com.bbn.hadder.commands.Command; +import com.bbn.hadder.commands.CommandEvent; +import com.bbn.hadder.utils.MessageEditor; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; +import org.json.JSONObject; + +import java.io.IOException; + +public class RandomPornCommand implements Command { + + @Override + public void executed(String[] args, CommandEvent event) { + if (event.getTextChannel().isNSFW()) { + + OkHttpClient caller = new OkHttpClient(); + Request request = new Request.Builder().url("https://api.nekos.dev/api/v3/images/nsfw/gif/all_tags/").build(); + + try { + + Response response = caller.newCall(request).execute(); + JSONObject json = new JSONObject(response.body().string()); + JSONObject data = json.getJSONObject("data"); + JSONObject response1 = data.getJSONObject("response"); + String url = response1.toString().replace("{\"url\":\"", ""); + + event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) + .setAuthor("GIF not showing? Click here", url.replace("\"}", "")) + .setImage(url.replace("\"}", "")) + .setFooter("Random Porn") + .build()).queue(); + + } catch (IOException e) { + e.printStackTrace(); + } + + } else { + event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING).setTitle("No NSFW").setDescription("You can only execute this command in NSFW channels!").build()).queue(); + } + } + + @Override + public String[] labels() { + return new String[]{"randomporn", "pornrandom"}; + } + + @Override + public String description() { + return "Shows a completely random porn gif."; + } + + @Override + public String usage() { + return ""; + } +} diff --git a/src/main/java/com/bbn/hadder/commands/nsfw/SoloCommand.java b/src/main/java/com/bbn/hadder/commands/nsfw/SoloCommand.java new file mode 100644 index 00000000..acc1b24d --- /dev/null +++ b/src/main/java/com/bbn/hadder/commands/nsfw/SoloCommand.java @@ -0,0 +1,63 @@ +package com.bbn.hadder.commands.nsfw; + +/* + * @author Skidder / GregTCLTK + */ + +import com.bbn.hadder.commands.Command; +import com.bbn.hadder.commands.CommandEvent; +import com.bbn.hadder.utils.MessageEditor; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; +import org.json.JSONObject; + +import java.io.IOException; + +public class SoloCommand implements Command { + + @Override + public void executed(String[] args, CommandEvent event) { + if (event.getTextChannel().isNSFW()) { + + OkHttpClient caller = new OkHttpClient(); + Request request = new Request.Builder().url("https://api.nekos.dev/api/v3/images/nsfw/gif/girls_solo/").build(); + + try { + + Response response = caller.newCall(request).execute(); + JSONObject json = new JSONObject(response.body().string()); + JSONObject data = json.getJSONObject("data"); + JSONObject response1 = data.getJSONObject("response"); + String url = response1.toString().replace("{\"url\":\"", ""); + + event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) + .setAuthor("GIF not showing? Click here", url.replace("\"}", "")) + .setImage(url.replace("\"}", "")) + .setFooter("Solo") + .build()).queue(); + + } catch (IOException e) { + e.printStackTrace(); + } + + } else { + event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING).setTitle("No NSFW").setDescription("You can only execute this command in NSFW channels!").build()).queue(); + } + } + + @Override + public String[] labels() { + return new String[]{"solo"}; + } + + @Override + public String description() { + return "Shows a random solo gif."; + } + + @Override + public String usage() { + return ""; + } +} diff --git a/src/main/java/com/bbn/hadder/commands/nsfw/SpankCommand.java b/src/main/java/com/bbn/hadder/commands/nsfw/SpankCommand.java new file mode 100644 index 00000000..a9362eb4 --- /dev/null +++ b/src/main/java/com/bbn/hadder/commands/nsfw/SpankCommand.java @@ -0,0 +1,63 @@ +package com.bbn.hadder.commands.nsfw; + +/* + * @author Skidder / GregTCLTK + */ + +import com.bbn.hadder.commands.Command; +import com.bbn.hadder.commands.CommandEvent; +import com.bbn.hadder.utils.MessageEditor; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; +import org.json.JSONObject; + +import java.io.IOException; + +public class SpankCommand implements Command { + + @Override + public void executed(String[] args, CommandEvent event) { + if (event.getTextChannel().isNSFW()) { + + OkHttpClient caller = new OkHttpClient(); + Request request = new Request.Builder().url("https://api.nekos.dev/api/v3/images/nsfw/gif/spank/").build(); + + try { + + Response response = caller.newCall(request).execute(); + JSONObject json = new JSONObject(response.body().string()); + JSONObject data = json.getJSONObject("data"); + JSONObject response1 = data.getJSONObject("response"); + String url = response1.toString().replace("{\"url\":\"", ""); + + event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO) + .setAuthor("GIF not showing? Click here", url.replace("\"}", "")) + .setImage(url.replace("\"}", "")) + .setFooter("Spank") + .build()).queue(); + + } catch (IOException e) { + e.printStackTrace(); + } + + } else { + event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING).setTitle("No NSFW").setDescription("You can only execute this command in NSFW channels!").build()).queue(); + } + } + + @Override + public String[] labels() { + return new String[]{"spank", "beat", "hit"}; + } + + @Override + public String description() { + return "Shows a random spank gif."; + } + + @Override + public String usage() { + return ""; + } +}