NSFW commands #152
13 changed files with 421 additions and 14 deletions
3
.dockerignore
Normal file
3
.dockerignore
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
.github/
|
||||||
|
target/
|
||||||
|
.idea/
|
||||||
|
|
@ -79,6 +79,12 @@ public class Hadder {
|
||||||
new GuildLeaveCommand(),
|
new GuildLeaveCommand(),
|
||||||
new MemeCommand(),
|
new MemeCommand(),
|
||||||
new InviteDetectCommand(),
|
new InviteDetectCommand(),
|
||||||
|
new BDSMCommand(),
|
||||||
|
new FingeringCommand(),
|
||||||
|
new LickingCommand(),
|
||||||
|
new SpankCommand(),
|
||||||
|
new RandomPornCommand(),
|
||||||
|
new SoloCommand(),
|
||||||
new LinkCommand()), config, helpCommand);
|
new LinkCommand()), config, helpCommand);
|
||||||
|
|
||||||
builder.addEventListeners(
|
builder.addEventListeners(
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import com.bbn.hadder.utils.MessageEditor;
|
||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
import okhttp3.Request;
|
import okhttp3.Request;
|
||||||
import okhttp3.Response;
|
import okhttp3.Response;
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
|
@ -20,12 +21,15 @@ public class AnalCommand implements Command {
|
||||||
if (event.getTextChannel().isNSFW()) {
|
if (event.getTextChannel().isNSFW()) {
|
||||||
|
|
||||||
OkHttpClient caller = new OkHttpClient();
|
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 {
|
try {
|
||||||
|
|
||||||
Response response = caller.newCall(request).execute();
|
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)
|
event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO)
|
||||||
.setAuthor("GIF not showing? Click here", url.replace("\"}", ""))
|
.setAuthor("GIF not showing? Click here", url.replace("\"}", ""))
|
||||||
|
|
|
||||||
63
src/main/java/com/bbn/hadder/commands/nsfw/BDSMCommand.java
Normal file
63
src/main/java/com/bbn/hadder/commands/nsfw/BDSMCommand.java
Normal file
|
|
@ -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 "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -10,6 +10,7 @@ import com.bbn.hadder.utils.MessageEditor;
|
||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
import okhttp3.Request;
|
import okhttp3.Request;
|
||||||
import okhttp3.Response;
|
import okhttp3.Response;
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
|
@ -20,12 +21,15 @@ public class BoobsCommand implements Command {
|
||||||
if (event.getTextChannel().isNSFW()) {
|
if (event.getTextChannel().isNSFW()) {
|
||||||
|
|
||||||
OkHttpClient caller = new OkHttpClient();
|
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 {
|
try {
|
||||||
|
|
||||||
Response response = caller.newCall(request).execute();
|
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)
|
event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO)
|
||||||
.setAuthor("GIF not showing? Click here", url.replace("\"}", ""))
|
.setAuthor("GIF not showing? Click here", url.replace("\"}", ""))
|
||||||
|
|
@ -44,7 +48,7 @@ public class BoobsCommand implements Command {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] labels() {
|
public String[] labels() {
|
||||||
return new String[]{"boobs"};
|
return new String[]{"boobs", "boob", "tits"};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import com.bbn.hadder.utils.MessageEditor;
|
||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
import okhttp3.Request;
|
import okhttp3.Request;
|
||||||
import okhttp3.Response;
|
import okhttp3.Response;
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
|
@ -20,12 +21,15 @@ public class CumCommand implements Command {
|
||||||
if (event.getTextChannel().isNSFW()) {
|
if (event.getTextChannel().isNSFW()) {
|
||||||
|
|
||||||
OkHttpClient caller = new OkHttpClient();
|
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 {
|
try {
|
||||||
|
|
||||||
Response response = caller.newCall(request).execute();
|
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)
|
event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO)
|
||||||
.setAuthor("GIF not showing? Click here", url.replace("\"}", ""))
|
.setAuthor("GIF not showing? Click here", url.replace("\"}", ""))
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import com.bbn.hadder.utils.MessageEditor;
|
||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
import okhttp3.Request;
|
import okhttp3.Request;
|
||||||
import okhttp3.Response;
|
import okhttp3.Response;
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
|
@ -20,15 +21,18 @@ public class FeetCommand implements Command {
|
||||||
if (event.getTextChannel().isNSFW()) {
|
if (event.getTextChannel().isNSFW()) {
|
||||||
|
|
||||||
OkHttpClient caller = new OkHttpClient();
|
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 {
|
try {
|
||||||
|
|
||||||
Response response = caller.newCall(request).execute();
|
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)
|
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("\"}", ""))
|
.setImage(url.replace("\"}", ""))
|
||||||
.setFooter("Feet")
|
.setFooter("Feet")
|
||||||
.build()).queue();
|
.build()).queue();
|
||||||
|
|
@ -49,7 +53,7 @@ public class FeetCommand implements Command {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String description() {
|
public String description() {
|
||||||
return "Shows a random feet picture.";
|
return "Shows a random feet gif.";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -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 "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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 "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -10,6 +10,7 @@ import com.bbn.hadder.utils.MessageEditor;
|
||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
import okhttp3.Request;
|
import okhttp3.Request;
|
||||||
import okhttp3.Response;
|
import okhttp3.Response;
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
|
@ -20,12 +21,15 @@ public class PornCommand implements Command {
|
||||||
if (event.getTextChannel().isNSFW()) {
|
if (event.getTextChannel().isNSFW()) {
|
||||||
|
|
||||||
OkHttpClient caller = new OkHttpClient();
|
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 {
|
try {
|
||||||
|
|
||||||
Response response = caller.newCall(request).execute();
|
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)
|
event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO)
|
||||||
.setAuthor("GIF not showing? Click here", url.replace("\"}", ""))
|
.setAuthor("GIF not showing? Click here", url.replace("\"}", ""))
|
||||||
|
|
|
||||||
|
|
@ -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 "";
|
||||||
|
}
|
||||||
|
}
|
||||||
63
src/main/java/com/bbn/hadder/commands/nsfw/SoloCommand.java
Normal file
63
src/main/java/com/bbn/hadder/commands/nsfw/SoloCommand.java
Normal file
|
|
@ -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 "";
|
||||||
|
}
|
||||||
|
}
|
||||||
63
src/main/java/com/bbn/hadder/commands/nsfw/SpankCommand.java
Normal file
63
src/main/java/com/bbn/hadder/commands/nsfw/SpankCommand.java
Normal file
|
|
@ -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 "";
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue