Skip to content

Commit

Permalink
Add Base_tags to Bot
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewVynnytskyi committed Jan 26, 2024
1 parent 4e23e31 commit f6e66c0
Showing 1 changed file with 91 additions and 5 deletions.
96 changes: 91 additions & 5 deletions src/main/java/org/hentaibot/HentaiBot.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ public class HentaiBot extends TelegramLongPollingBot {
private static final Random random = new Random();
private static final List<String> picExtensions =
Arrays.asList(".jpg", ".jpeg", ".png", ".webp", ".avif", ".jfif");

private static final List<String> tags =
Arrays.asList("ass","anal","cum","creampie","hentai","masturbation",
"public","orgy","elf","yuri","pussy","glasses","blowjob",
"handjob","footjob","boobs","thighs","ahe_gao","uniform","gangbang","tentacles","genshin_impact", "naruto", "bleach");
private static final List<String> tags_artist =
Arrays.asList("shexyo", "theobrobine", "cutesexyrobutts", "sakimichan", "krabby_(artist)", "lexaiduer", "miraihikari",
"LumiNyu", "lime_(purple_haze", "nepcill", "sciamano240", "neoartcore", "dandon_fuga", "zaphn", "flou",
"prywinko", "alexander_dinh", "kittew", "supullim", "tofuubear", "azto_dio", "derpixon", "kinkymation", "ggc", "afrobull");

private static final Logger logger = Logger.getLogger(HentaiBot.class.getName());

private static final HentaiQueries hentaiClient = Client.getNsfwClient();
Expand All @@ -52,6 +62,7 @@ public void onUpdateReceived(Update update) {
}

String userMsg = update.getMessage().getText(), respText;

switch (userMsg) {
case "/start" -> respText = """
Hi! I'm HentaiBot. I can send you some spicy anime pics.
Expand All @@ -63,16 +74,91 @@ public void onUpdateReceived(Update update) {
/help
/hentai
/anime
/help_tags
""";
case "/help_tags" -> respText = """
List of tags available for now:
/tags_anal
/tags_cum
/tags_creampie
/tags_hentai
/tags_masturbation
/tags_public
/tags_orgy
/tags_elf
/tags_yuri
/tags_pussy
/tags_glasses
/tags_blowjob
/tags_handjob
/tags_footjob
/tags_boobs
/tags_thighs
/tags_ahe_gao
/tags_uniform
/tags_gangbang
/tags_tentacles
/tags_genshin_impact
/tags_naruto
/tags_bleach
/tags_shexyo
/tags_theobrobine
/tags_cutesexyrobutts
/tags_sakimichan
/tags_krabby_(artist)
/tags_lexaiduer
/tags_miraihikari
/tags_LumiNyu
/tags_lime_(purple_haze)
/tags_nepcill
/tags_sciamano240
/tags_neoartcore
/tags_dandon_fuga
/tags_zaphn
/tags_flou
/tags_prywinko
/tags_alexander_dinh
/tags_kittew
/tags_supullim
/tags_tofuubear
/tags_azto_dio
/tags_derpixon
/tags_kinkymation
/tags_ggc
/tags_afrobull
""";
case "/anime", "/sfw" -> {
respText = null;
respondSfw(chatId);
}
case "/hentai", "/nsfw" -> {
respText = null;
respondNsfw(chatId);
respondNsfw(chatId, "female", 200000);
}
default ->
{
if (userMsg.startsWith("/tags_"))
{
respText = null;
if(tags.contains(userMsg.substring(6)))
{
respondNsfw(chatId, userMsg.substring(6) , 50000);
}
else if(tags_artist.contains(userMsg.substring(6)))
{
respondNsfw(chatId, userMsg.substring(6), 500);
}
else
{
respText = "Invalid command. For list of all supported commands, try /help_tags";
}
}
else
{
respText = "Invalid command. For list of all supported commands, try /help";
}

}
default -> respText = "Invalid command. For list of all supported commands, try /help";
}

respondWithText(chatId, respText);
Expand All @@ -83,12 +169,12 @@ public String getBotUsername() {
return botName;
}

public void respondNsfw(String chatId) {
int pageId = random.nextInt(1, 3970);
public void respondNsfw(String chatId, String tag, int rand_number) {
int pageId = random.nextInt(1, rand_number);

try {
hentaiClient
.getNsfw("female", pageId)
.getNsfw(tag, pageId)
.enqueue(
new Callback<>() {
@Override
Expand Down

0 comments on commit f6e66c0

Please sign in to comment.