This repository has been archived by the owner on Mar 5, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #152 from BigBotNetwork/greg-dev
NSFW commands
- Loading branch information
Showing
13 changed files
with
421 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.github/ | ||
target/ | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
src/main/java/com/bbn/hadder/commands/nsfw/BDSMCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ""; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
src/main/java/com/bbn/hadder/commands/nsfw/FingeringCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
63
src/main/java/com/bbn/hadder/commands/nsfw/LickingCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ""; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.