From f6e66c0c2311c5a68941fe2f6ff0df70fc7fb6de Mon Sep 17 00:00:00 2001 From: AndrewVynnytskyi Date: Sat, 27 Jan 2024 01:35:01 +0200 Subject: [PATCH] Add Base_tags to Bot --- src/main/java/org/hentaibot/HentaiBot.java | 96 ++++++++++++++++++++-- 1 file changed, 91 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/hentaibot/HentaiBot.java b/src/main/java/org/hentaibot/HentaiBot.java index f6a5c7f..aa8d4f1 100644 --- a/src/main/java/org/hentaibot/HentaiBot.java +++ b/src/main/java/org/hentaibot/HentaiBot.java @@ -30,6 +30,16 @@ public class HentaiBot extends TelegramLongPollingBot { private static final Random random = new Random(); private static final List picExtensions = Arrays.asList(".jpg", ".jpeg", ".png", ".webp", ".avif", ".jfif"); + + private static final List 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 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(); @@ -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. @@ -63,6 +74,58 @@ 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; @@ -70,9 +133,32 @@ public void onUpdateReceived(Update update) { } 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); @@ -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