Skip to content
This repository has been archived by the owner on Mar 5, 2023. It is now read-only.

Commit

Permalink
Merge pull request #152 from BigBotNetwork/greg-dev
Browse files Browse the repository at this point in the history
NSFW commands
  • Loading branch information
greg6775 authored Dec 3, 2019
2 parents b149dd8 + 805eb78 commit 7ae3e29
Show file tree
Hide file tree
Showing 13 changed files with 421 additions and 14 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.github/
target/
.idea/
8 changes: 7 additions & 1 deletion src/main/java/com/bbn/hadder/Hadder.java
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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));

Expand Down
8 changes: 6 additions & 2 deletions src/main/java/com/bbn/hadder/commands/nsfw/AnalCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import org.json.JSONObject;

import java.io.IOException;

Expand All @@ -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("\"}", ""))
Expand Down
63 changes: 63 additions & 0 deletions src/main/java/com/bbn/hadder/commands/nsfw/BDSMCommand.java
Original file line number Diff line number Diff line change
@@ -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 changes: 7 additions & 3 deletions src/main/java/com/bbn/hadder/commands/nsfw/BoobsCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import org.json.JSONObject;

import java.io.IOException;

Expand All @@ -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("\"}", ""))
Expand All @@ -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
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/com/bbn/hadder/commands/nsfw/CumCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import org.json.JSONObject;

import java.io.IOException;

Expand All @@ -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("\"}", ""))
Expand Down
12 changes: 8 additions & 4 deletions src/main/java/com/bbn/hadder/commands/nsfw/FeetCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import org.json.JSONObject;

import java.io.IOException;

Expand All @@ -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();
Expand All @@ -49,7 +53,7 @@ public String[] labels() {

@Override
public String description() {
return "Shows a random feet picture.";
return "Shows a random feet gif.";
}

@Override
Expand Down
63 changes: 63 additions & 0 deletions src/main/java/com/bbn/hadder/commands/nsfw/FingeringCommand.java
Original file line number Diff line number Diff line change
@@ -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 "";
}
}
63 changes: 63 additions & 0 deletions src/main/java/com/bbn/hadder/commands/nsfw/LickingCommand.java
Original file line number Diff line number Diff line change
@@ -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 "";
}
}
8 changes: 6 additions & 2 deletions src/main/java/com/bbn/hadder/commands/nsfw/PornCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import org.json.JSONObject;

import java.io.IOException;

Expand All @@ -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("\"}", ""))
Expand Down
Loading

0 comments on commit 7ae3e29

Please sign in to comment.