From c3d22e87d8690a337aec6d93d0e067106765c511 Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Tue, 3 Dec 2019 19:44:31 +0100 Subject: [PATCH 1/4] BDSM Command --- src/main/java/com/bbn/hadder/Hadder.java | 3 +- .../bbn/hadder/commands/nsfw/BDSMCommand.java | 63 +++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/bbn/hadder/commands/nsfw/BDSMCommand.java diff --git a/src/main/java/com/bbn/hadder/Hadder.java b/src/main/java/com/bbn/hadder/Hadder.java index 71e75f9a..4b11c768 100644 --- a/src/main/java/com/bbn/hadder/Hadder.java +++ b/src/main/java/com/bbn/hadder/Hadder.java @@ -79,6 +79,7 @@ private static void startBot() { new GuildLeaveCommand(), new MemeCommand(), new InviteDetectCommand(), + new BDSMCommand(), new LinkCommand()), config, helpCommand); builder.addEventListeners( @@ -87,7 +88,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/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 ""; + } +} From dfab0507998cd2aab76a43c08afa3dcd955918be Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Tue, 3 Dec 2019 19:48:44 +0100 Subject: [PATCH 2/4] .dockerignore --- .dockerignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..824067a3 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +.github/ +target/ +.idea/ From 292a1d5c792f698d7e90bdca19ee28232a95f8ce Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Tue, 3 Dec 2019 20:02:22 +0100 Subject: [PATCH 3/4] Update and add new NSFW commands --- src/main/java/com/bbn/hadder/Hadder.java | 2 + .../hadder/commands/nsfw/BoobsCommand.java | 10 ++- .../commands/nsfw/FingeringCommand.java | 63 +++++++++++++++++++ .../hadder/commands/nsfw/LickingCommand.java | 63 +++++++++++++++++++ .../bbn/hadder/commands/nsfw/PornCommand.java | 8 ++- 5 files changed, 141 insertions(+), 5 deletions(-) create mode 100644 src/main/java/com/bbn/hadder/commands/nsfw/FingeringCommand.java create mode 100644 src/main/java/com/bbn/hadder/commands/nsfw/LickingCommand.java diff --git a/src/main/java/com/bbn/hadder/Hadder.java b/src/main/java/com/bbn/hadder/Hadder.java index 4b11c768..900289c7 100644 --- a/src/main/java/com/bbn/hadder/Hadder.java +++ b/src/main/java/com/bbn/hadder/Hadder.java @@ -80,6 +80,8 @@ private static void startBot() { new MemeCommand(), new InviteDetectCommand(), new BDSMCommand(), + new FingeringCommand(), + new LickingCommand(), new LinkCommand()), config, helpCommand); builder.addEventListeners( 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/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("\"}", "")) From 805eb78c25e55afd4cf971cf11c4050849e96f8a Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Tue, 3 Dec 2019 20:14:04 +0100 Subject: [PATCH 4/4] Update and add new NSF commands 2.0 --- src/main/java/com/bbn/hadder/Hadder.java | 3 + .../bbn/hadder/commands/nsfw/AnalCommand.java | 8 ++- .../bbn/hadder/commands/nsfw/CumCommand.java | 8 ++- .../bbn/hadder/commands/nsfw/FeetCommand.java | 12 ++-- .../commands/nsfw/RandomPornCommand.java | 63 +++++++++++++++++++ .../bbn/hadder/commands/nsfw/SoloCommand.java | 63 +++++++++++++++++++ .../hadder/commands/nsfw/SpankCommand.java | 63 +++++++++++++++++++ 7 files changed, 212 insertions(+), 8 deletions(-) create mode 100644 src/main/java/com/bbn/hadder/commands/nsfw/RandomPornCommand.java create mode 100644 src/main/java/com/bbn/hadder/commands/nsfw/SoloCommand.java create mode 100644 src/main/java/com/bbn/hadder/commands/nsfw/SpankCommand.java diff --git a/src/main/java/com/bbn/hadder/Hadder.java b/src/main/java/com/bbn/hadder/Hadder.java index 900289c7..a88607e2 100644 --- a/src/main/java/com/bbn/hadder/Hadder.java +++ b/src/main/java/com/bbn/hadder/Hadder.java @@ -82,6 +82,9 @@ private static void startBot() { new BDSMCommand(), new FingeringCommand(), new LickingCommand(), + new SpankCommand(), + new RandomPornCommand(), + new SoloCommand(), new LinkCommand()), config, helpCommand); builder.addEventListeners( 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/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/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 ""; + } +}