How to use run_async method in lisa

Best Python code snippet using lisa_python

Hentai.py

Source:Hentai.py Github

copy

Full Screen

1import requests2import EvilBot.modules.hentai as hemtai3from PIL import Image4import os5from telegram import Message, Chat, Update, Bot, MessageEntity6from telegram import ParseMode7from telegram.ext import CommandHandler, run_async8from EvilBot import dispatcher, updater9def is_user_in_chat(chat: Chat, user_id: int) -> bool:10 member = chat.get_member(user_id)11 return member.status not in ("left", "kicked")12@run_async13def neko(update, context):14 msg = update.effective_message15 target = "neko"16 msg.reply_photo(nekos.img(target))17@run_async18def feet(update, context):19 msg = update.effective_message20 target = "feet"21 msg.reply_photo(nekos.img(target))22@run_async23def yuri(update, context):24 msg = update.effective_message25 target = "yuri"26 msg.reply_photo(nekos.img(target))27@run_async28def trap(update, context):29 msg = update.effective_message30 target = "trap"31 msg.reply_photo(nekos.img(target))32@run_async33def futanari(update, context):34 msg = update.effective_message35 target = "futanari"36 msg.reply_photo(nekos.img(target))37@run_async38def hololewd(update, context):39 msg = update.effective_message40 target = "hololewd"41 msg.reply_photo(nekos.img(target))42@run_async43def lewdkemo(update, context):44 msg = update.effective_message45 target = "lewdkemo"46 msg.reply_photo(nekos.img(target))47@run_async48def sologif(update, context):49 msg = update.effective_message50 target = "solog"51 msg.reply_video(nekos.img(target))52@run_async53def feetgif(update, context):54 msg = update.effective_message55 target = "feetg"56 msg.reply_video(nekos.img(target))57@run_async58def cumgif(update, context):59 msg = update.effective_message60 target = "cum"61 msg.reply_video(nekos.img(target))62@run_async63def erokemo(update, context):64 msg = update.effective_message65 target = "erokemo"66 msg.reply_photo(nekos.img(target))67@run_async68def lesbian(update, context):69 msg = update.effective_message70 target = "les"71 msg.reply_video(nekos.img(target))72@run_async73def wallpaper(update, context):74 msg = update.effective_message75 target = "wallpaper"76 msg.reply_photo(nekos.img(target))77@run_async78def lewdk(update, context):79 msg = update.effective_message80 target = "lewdk"81 msg.reply_photo(nekos.img(target))82@run_async83def ngif(update, context):84 msg = update.effective_message85 target = "ngif"86 msg.reply_video(nekos.img(target))87@run_async88def tickle(update, context):89 msg = update.effective_message90 target = "tickle"91 msg.reply_video(nekos.img(target))92@run_async93def lewd(update, context):94 msg = update.effective_message95 target = "lewd"96 msg.reply_photo(nekos.img(target))97@run_async98def feed(update, context):99 msg = update.effective_message100 target = "feed"101 msg.reply_video(nekos.img(target))102@run_async103def eroyuri(update, context):104 msg = update.effective_message105 target = "eroyuri"106 msg.reply_photo(nekos.img(target))107@run_async108def eron(update, context):109 msg = update.effective_message110 target = "eron"111 msg.reply_photo(nekos.img(target))112@run_async113def cum(update, context):114 msg = update.effective_message115 target = "cum_jpg"116 msg.reply_photo(nekos.img(target))117@run_async118def bjgif(update, context):119 msg = update.effective_message120 target = "bj"121 msg.reply_video(nekos.img(target))122@run_async123def bj(update, context):124 msg = update.effective_message125 target = "blowjob"126 msg.reply_photo(nekos.img(target))127@run_async128def nekonsfw(update, context):129 msg = update.effective_message130 target = "nsfw_neko_gif"131 msg.reply_video(nekos.img(target))132@run_async133def solo(update, context):134 msg = update.effective_message135 target = "solo"136 msg.reply_photo(nekos.img(target))137@run_async138def kemonomimi(update, context):139 msg = update.effective_message140 target = "kemonomimi"141 msg.reply_photo(nekos.img(target))142@run_async143def avatarlewd(update, context):144 msg = update.effective_message145 target = "nsfw_avatar"146 with open("temp.png", "wb") as f:147 f.write(requests.get(nekos.img(target)).content)148 img = Image.open("temp.png")149 img.save("temp.webp", "webp")150 msg.reply_document(open("temp.webp", "rb"))151 os.remove("temp.webp")152@run_async153def gasm(update, context):154 msg = update.effective_message155 target = "gasm"156 with open("temp.png", "wb") as f:157 f.write(requests.get(nekos.img(target)).content)158 img = Image.open("temp.png")159 img.save("temp.webp", "webp")160 msg.reply_document(open("temp.webp", "rb"))161 os.remove("temp.webp")162@run_async163def poke(update, context):164 msg = update.effective_message165 target = "poke"166 msg.reply_video(nekos.img(target))167@run_async168def anal(update, context):169 msg = update.effective_message170 target = "anal"171 msg.reply_video(nekos.img(target))172@run_async173def hentai(update, context):174 msg = update.effective_message175 target = "hentai"176 msg.reply_photo(nekos.img(target))177@run_async178def avatar(update, context):179 msg = update.effective_message180 target = "nsfw_avatar"181 with open("temp.png", "wb") as f:182 f.write(requests.get(nekos.img(target)).content)183 img = Image.open("temp.png")184 img.save("temp.webp", "webp")185 msg.reply_document(open("temp.webp", "rb"))186 os.remove("temp.webp")187@run_async188def erofeet(update, context):189 msg = update.effective_message190 target = "erofeet"191 msg.reply_photo(nekos.img(target))192@run_async193def holo(update, context):194 msg = update.effective_message195 target = "holo"196 msg.reply_photo(nekos.img(target))197# def keta(update, context):198# msg = update.effective_message199# target = 'keta'200# if not target:201# msg.reply_text("No URL was received from the API!")202# return203# msg.reply_photo(nekos.img(target))204@run_async205def pussygif(update, context):206 msg = update.effective_message207 target = "pussy"208 msg.reply_video(nekos.img(target))209@run_async210def tits(update, context):211 msg = update.effective_message212 target = "tits"213 msg.reply_photo(nekos.img(target))214@run_async215def holoero(update, context):216 msg = update.effective_message217 target = "holoero"218 msg.reply_photo(nekos.img(target))219@run_async220def pussy(update, context):221 msg = update.effective_message222 target = "pussy_jpg"223 msg.reply_photo(nekos.img(target))224@run_async225def hentaigif(update, context):226 msg = update.effective_message227 target = "random_hentai_gif"228 msg.reply_video(nekos.img(target))229@run_async230def classic(update, context):231 msg = update.effective_message232 target = "classic"233 msg.reply_video(nekos.img(target))234@run_async235def kuni(update, context):236 msg = update.effective_message237 target = "kuni"238 msg.reply_video(nekos.img(target))239@run_async240def waifu(update, context):241 msg = update.effective_message242 target = "waifu"243 with open("temp.png", "wb") as f:244 f.write(requests.get(nekos.img(target)).content)245 img = Image.open("temp.png")246 img.save("temp.webp", "webp")247 msg.reply_document(open("temp.webp", "rb"))248 os.remove("temp.webp")249@run_async250def kiss(update, context):251 msg = update.effective_message252 target = "kiss"253 msg.reply_video(nekos.img(target))254@run_async255def femdom(update, context):256 msg = update.effective_message257 target = "femdom"258 msg.reply_photo(nekos.img(target))259@run_async260def cuddle(update, context):261 msg = update.effective_message262 target = "cuddle"263 msg.reply_video(nekos.img(target))264@run_async265def erok(update, context):266 msg = update.effective_message267 target = "erok"268 msg.reply_photo(nekos.img(target))269@run_async270def foxgirl(update, context):271 msg = update.effective_message272 target = "fox_girl"273 msg.reply_photo(nekos.img(target))274@run_async275def titsgif(update, context):276 msg = update.effective_message277 target = "boobs"278 msg.reply_video(nekos.img(target))279@run_async280def ero(update, context):281 msg = update.effective_message282 target = "ero"283 msg.reply_photo(nekos.img(target))284@run_async285def smug(update, context):286 msg = update.effective_message287 target = "smug"288 msg.reply_video(nekos.img(target))289@run_async290def baka(update, context):291 msg = update.effective_message292 target = "baka"293 msg.reply_video(nekos.img(target))294@run_async295def dva(update, context):296 msg = update.effective_message297 nsfw = requests.get("https://api.computerfreaker.cf/v1/dva").json()298 url = nsfw.get("url")299 # do shit with url if you want to300 if not url:301 msg.reply_text("No URL was received from the API!")302 return303 msg.reply_photo(url)304__mod_name__ = "Lewd"305__help__ = """306 - /neko: Sends Random SFW Neko source Images.307 - /feet: Sends Random Anime Feet Images.308 - /yuri: Sends Random Yuri source Images.309 - /trap: Sends Random Trap source Images.310 - /futanari: Sends Random Futanari source Images.311 - /hololewd: Sends Random Holo Lewds.312 - /lewdkemo: Sends Random Kemo Lewds.313 - /sologif: Sends Random Solo GIFs.314 - /cumgif: Sends Random Cum GIFs.315 - /erokemo: Sends Random Ero-Kemo Images.316 - /lesbian: Sends Random Les Source Images.317 - /wallpaper: Sends Random Wallpapers.318 - /lewdk: Sends Random Kitsune Lewds.319 - /ngif: Sends Random Neko GIFs.320 - /tickle: Sends Random Tickle GIFs.321 - /lewd: Sends Random Lewds.322 - /feed: Sends Random Feeding GIFs.323 - /eroyuri: Sends Random Ero-Yuri source Images.324 - /eron: Sends Random Ero-Neko source Images.325 - /cum: Sends Random Cum Images.326 - /bjgif: Sends Random Blow Job GIFs.327 - /bj: Sends Random Blow Job source Images.328 - /nekonsfw: Sends Random NSFW Neko source Images.329 - /solo: Sends Random NSFW Neko GIFs.330 - /kemonomimi: Sends Random KemonoMimi source Images.331 - /avatarlewd: Sends Random Avater Lewd Stickers.332 - /gasm: Sends Random Orgasm Stickers.333 - /poke: Sends Random Poke GIFs.334 - /anal: Sends Random Anal GIFs.335 - /hentai: Sends Random Hentai source Images.336 - /avatar: Sends Random Avatar Stickers.337 - /erofeet: Sends Random Ero-Feet source Images.338 - /holo: Sends Random Holo source Images.339 - /tits: Sends Random Tits source Images.340 - /pussygif: Sends Random Pussy GIFs.341 - /holoero: Sends Random Ero-Holo source Images.342 - /pussy: Sends Random Pussy source Images.343 - /hentaigif: Sends Random Hentai GIFs.344 - /classic: Sends Random Classic Hentai GIFs.345 - /kuni: Sends Random Pussy Lick GIFs.346 - /waifu: Sends Random Waifu Stickers.347 - /kiss: Sends Random Kissing GIFs.348 - /femdom: Sends Random Femdom source Images.349 - /cuddle: Sends Random Cuddle GIFs.350 - /erok: Sends Random Ero-Kitsune source Images.351 - /foxgirl: Sends Random FoxGirl source Images.352 - /titsgif: Sends Random Tits GIFs.353 - /ero: Sends Random Ero source Images.354 - /smug: Sends Random Smug GIFs.355 - /baka: Sends Random Baka Shout GIFs.356 - /dva: Sends Random D.VA source Images.357"""358LEWDKEMO_HANDLER = CommandHandler("lewdkemo", lewdkemo)359NEKO_HANDLER = CommandHandler("neko", neko)360FEET_HANDLER = CommandHandler("feet", feet)361YURI_HANDLER = CommandHandler("yuri", yuri)362TRAP_HANDLER = CommandHandler("trap", trap)363FUTANARI_HANDLER = CommandHandler("futanari", futanari)364HOLOLEWD_HANDLER = CommandHandler("hololewd", hololewd)365SOLOGIF_HANDLER = CommandHandler("sologif", sologif)366CUMGIF_HANDLER = CommandHandler("cumgif", cumgif)367EROKEMO_HANDLER = CommandHandler("erokemo", erokemo)368LESBIAN_HANDLER = CommandHandler("lesbian", lesbian)369WALLPAPER_HANDLER = CommandHandler("wallpaper", wallpaper)370LEWDK_HANDLER = CommandHandler("lewdk", lewdk)371NGIF_HANDLER = CommandHandler("ngif", ngif)372TICKLE_HANDLER = CommandHandler("tickle", tickle)373LEWD_HANDLER = CommandHandler("lewd", lewd)374FEED_HANDLER = CommandHandler("feed", feed)375EROYURI_HANDLER = CommandHandler("eroyuri", eroyuri)376ERON_HANDLER = CommandHandler("eron", eron)377CUM_HANDLER = CommandHandler("cum", cum)378BJGIF_HANDLER = CommandHandler("bjgif", bjgif)379BJ_HANDLER = CommandHandler("bj", bj)380NEKONSFW_HANDLER = CommandHandler("nekonsfw", nekonsfw)381SOLO_HANDLER = CommandHandler("solo", solo)382KEMONOMIMI_HANDLER = CommandHandler("kemonomimi", kemonomimi)383AVATARLEWD_HANDLER = CommandHandler("avatarlewd", avatarlewd)384GASM_HANDLER = CommandHandler("gasm", gasm)385POKE_HANDLER = CommandHandler("poke", poke)386ANAL_HANDLER = CommandHandler("anal", anal)387HENTAI_HANDLER = CommandHandler("hentai", hentai)388AVATAR_HANDLER = CommandHandler("avatar", avatar)389EROFEET_HANDLER = CommandHandler("erofeet", erofeet)390HOLO_HANDLER = CommandHandler("holo", holo)391TITS_HANDLER = CommandHandler("tits", tits)392PUSSYGIF_HANDLER = CommandHandler("pussygif", pussygif)393HOLOERO_HANDLER = CommandHandler("holoero", holoero)394PUSSY_HANDLER = CommandHandler("pussy", pussy)395HENTAIGIF_HANDLER = CommandHandler("hentaigif", hentaigif)396CLASSIC_HANDLER = CommandHandler("classic", classic)397KUNI_HANDLER = CommandHandler("kuni", kuni)398WAIFU_HANDLER = CommandHandler("waifu", waifu)399LEWD_HANDLER = CommandHandler("lewd", lewd)400KISS_HANDLER = CommandHandler("kiss", kiss)401FEMDOM_HANDLER = CommandHandler("femdom", femdom)402CUDDLE_HANDLER = CommandHandler("cuddle", cuddle)403EROK_HANDLER = CommandHandler("erok", erok)404FOXGIRL_HANDLER = CommandHandler("foxgirl", foxgirl)405TITSGIF_HANDLER = CommandHandler("titsgif", titsgif)406ERO_HANDLER = CommandHandler("ero", ero)407SMUG_HANDLER = CommandHandler("smug", smug)408BAKA_HANDLER = CommandHandler("baka", baka)409DVA_HANDLER = CommandHandler("dva", dva)410dispatcher.add_handler(LEWDKEMO_HANDLER)411dispatcher.add_handler(NEKO_HANDLER)412dispatcher.add_handler(FEET_HANDLER)413dispatcher.add_handler(YURI_HANDLER)414dispatcher.add_handler(TRAP_HANDLER)415dispatcher.add_handler(FUTANARI_HANDLER)416dispatcher.add_handler(HOLOLEWD_HANDLER)417dispatcher.add_handler(SOLOGIF_HANDLER)418dispatcher.add_handler(CUMGIF_HANDLER)419dispatcher.add_handler(EROKEMO_HANDLER)420dispatcher.add_handler(LESBIAN_HANDLER)421dispatcher.add_handler(WALLPAPER_HANDLER)422dispatcher.add_handler(LEWDK_HANDLER)423dispatcher.add_handler(NGIF_HANDLER)424dispatcher.add_handler(TICKLE_HANDLER)425dispatcher.add_handler(LEWD_HANDLER)426dispatcher.add_handler(FEED_HANDLER)427dispatcher.add_handler(EROYURI_HANDLER)428dispatcher.add_handler(ERON_HANDLER)429dispatcher.add_handler(CUM_HANDLER)430dispatcher.add_handler(BJGIF_HANDLER)431dispatcher.add_handler(BJ_HANDLER)432dispatcher.add_handler(NEKONSFW_HANDLER)433dispatcher.add_handler(SOLO_HANDLER)434dispatcher.add_handler(KEMONOMIMI_HANDLER)435dispatcher.add_handler(AVATARLEWD_HANDLER)436dispatcher.add_handler(GASM_HANDLER)437dispatcher.add_handler(POKE_HANDLER)438dispatcher.add_handler(ANAL_HANDLER)439dispatcher.add_handler(HENTAI_HANDLER)440dispatcher.add_handler(AVATAR_HANDLER)441dispatcher.add_handler(EROFEET_HANDLER)442dispatcher.add_handler(HOLO_HANDLER)443dispatcher.add_handler(TITS_HANDLER)444dispatcher.add_handler(PUSSYGIF_HANDLER)445dispatcher.add_handler(HOLOERO_HANDLER)446dispatcher.add_handler(PUSSY_HANDLER)447dispatcher.add_handler(HENTAIGIF_HANDLER)448dispatcher.add_handler(CLASSIC_HANDLER)449dispatcher.add_handler(KUNI_HANDLER)450dispatcher.add_handler(WAIFU_HANDLER)451dispatcher.add_handler(LEWD_HANDLER)452dispatcher.add_handler(KISS_HANDLER)453dispatcher.add_handler(FEMDOM_HANDLER)454dispatcher.add_handler(CUDDLE_HANDLER)455dispatcher.add_handler(EROK_HANDLER)456dispatcher.add_handler(FOXGIRL_HANDLER)457dispatcher.add_handler(TITSGIF_HANDLER)458dispatcher.add_handler(ERO_HANDLER)459dispatcher.add_handler(SMUG_HANDLER)460dispatcher.add_handler(BAKA_HANDLER)461dispatcher.add_handler(DVA_HANDLER)462__handlers__ = [463 NEKO_HANDLER,464 FEET_HANDLER,465 YURI_HANDLER,466 TRAP_HANDLER,467 FUTANARI_HANDLER,468 HOLOLEWD_HANDLER,469 SOLOGIF_HANDLER,470 CUMGIF_HANDLER,471 EROKEMO_HANDLER,472 LESBIAN_HANDLER,473 WALLPAPER_HANDLER,474 LEWDK_HANDLER,475 NGIF_HANDLER,476 TICKLE_HANDLER,477 LEWD_HANDLER,478 FEED_HANDLER,479 EROYURI_HANDLER,480 ERON_HANDLER,481 CUM_HANDLER,482 BJGIF_HANDLER,483 BJ_HANDLER,484 NEKONSFW_HANDLER,485 SOLO_HANDLER,486 KEMONOMIMI_HANDLER,487 AVATARLEWD_HANDLER,488 GASM_HANDLER,489 POKE_HANDLER,490 ANAL_HANDLER,491 HENTAI_HANDLER,492 AVATAR_HANDLER,493 EROFEET_HANDLER,494 HOLO_HANDLER,495 TITS_HANDLER,496 PUSSYGIF_HANDLER,497 HOLOERO_HANDLER,498 PUSSY_HANDLER,499 HENTAIGIF_HANDLER,500 CLASSIC_HANDLER,501 KUNI_HANDLER,502 WAIFU_HANDLER,503 LEWD_HANDLER,504 KISS_HANDLER,505 FEMDOM_HANDLER,506 LEWDKEMO_HANDLER,507 CUDDLE_HANDLER,508 EROK_HANDLER,509 FOXGIRL_HANDLER,510 TITSGIF_HANDLER,511 ERO_HANDLER,512 SMUG_HANDLER,513 BAKA_HANDLER,514 DVA_HANDLER,...

Full Screen

Full Screen

nekoxfun.py

Source:nekoxfun.py Github

copy

Full Screen

1"""2MIT License3Copyright (C) 2022 Awesome-Prince4Copyright (c) 2022, Yūki • Black Knights Union, <https://github.com/Awesome-Prince/NekoRobot-3>5This file is part of @NekoXRobot (Telegram Bot)6Permission is hereby granted, free of charge, to any person obtaining a copy7of this software and associated documentation files (the Software), to deal8in the Software without restriction, including without limitation the rights9to use, copy, modify, merge, publish, distribute, sublicense, and/or sell10copies of the Software, and to permit persons to whom the Software is11furnished to do so, subject to the following conditions:12The above copyright notice and this permission notice shall be included in all13copies or substantial portions of the Software.14THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR15IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,16FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE17AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER18LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,19OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE20SOFTWARE.21"""22import requests23import nekos24from PIL import Image25import os26from telegram import Message, Chat, Update, Bot, MessageEntity27from telegram import ParseMode28from telegram.ext import CommandHandler, run_async29from NekoRobot import dispatcher, updater30def is_user_in_chat(chat: Chat, user_id: int) -> bool:31 member = chat.get_member(user_id)32 return member.status not in ("left", "kicked")33@run_async34def neko(update, context):35 msg = update.effective_message36 target = "neko"37 msg.reply_photo(nekos.img(target))38#@run_async39#def feet(update, context):40# msg = update.effective_message41# target = "feet"42# msg.reply_photo(nekos.img(target))43#@run_async44#def yuri(update, context):45# msg = update.effective_message46# target = "yuri"47# msg.reply_photo(nekos.img(target))48#@run_async49#def trap(update, context):50# msg = update.effective_message51# target = "trap"52# msg.reply_photo(nekos.img(target))53#@run_async54#def futanari(update, context):55# msg = update.effective_message56# target = "futanari"57# msg.reply_photo(nekos.img(target))58#@run_async59#def hololewd(update, context):60# msg = update.effective_message61# target = "hololewd"62# msg.reply_photo(nekos.img(target))63#@run_async64#def lewdkemo(update, context):65# msg = update.effective_message66# target = "lewdkemo"67# msg.reply_photo(nekos.img(target))68#@run_async69#def sologif(update, context):70# msg = update.effective_message71# target = "solog"72# msg.reply_video(nekos.img(target))73#@run_async74#def feetgif(update, context):75# msg = update.effective_message76# target = "feetg"77# msg.reply_video(nekos.img(target))78#@run_async79#def cumgif(update, context):80# msg = update.effective_message81# target = "cum"82# msg.reply_video(nekos.img(target))83#@run_async84#def erokemo(update, context):85# msg = update.effective_message86# target = "erokemo"87# msg.reply_photo(nekos.img(target))88@run_async89def lesbian(update, context):90 msg = update.effective_message91 target = "les"92 msg.reply_video(nekos.img(target))93#@run_async94#def wallpaper(update, context):95# msg = update.effective_message96# target = "wallpaper"97# msg.reply_photo(nekos.img(target))98#@run_async99#def lewdk(update, context):100# msg = update.effective_message101# target = "lewdk"102# msg.reply_photo(nekos.img(target))103#@run_async104#def ngif(update, context):105# msg = update.effective_message106# target = "ngif"107# msg.reply_video(nekos.img(target))108@run_async109def tickle(update, context):110 msg = update.effective_message111 target = "tickle"112 msg.reply_video(nekos.img(target))113#@run_async114#def lewd(update, context):115# msg = update.effective_message116# target = "lewd"117# msg.reply_photo(nekos.img(target))118@run_async119def feed(update, context):120 msg = update.effective_message121 target = "feed"122 msg.reply_video(nekos.img(target))123#@run_async124#def eroyuri(update, context):125# msg = update.effective_message126# target = "eroyuri"127# msg.reply_photo(nekos.img(target))128#@run_async129#def eron(update, context):130# msg = update.effective_message131# target = "eron"132# msg.reply_photo(nekos.img(target))133#@run_async134#def cum(update, context):135# msg = update.effective_message136# target = "cum_jpg"137# msg.reply_photo(nekos.img(target))138#@run_async139#def bjgif(update, context):140# msg = update.effective_message141# target = "bj"142# msg.reply_video(nekos.img(target))143#@run_async144#def bj(update, context):145# msg = update.effective_message146# target = "blowjob"147# msg.reply_photo(nekos.img(target))148#@run_async149#def nekonsfw(update, context):150# msg = update.effective_message151# target = "nsfw_neko_gif"152# msg.reply_video(nekos.img(target))153#@run_async154#def solo(update, context):155# msg = update.effective_message156# target = "solo"157# msg.reply_photo(nekos.img(target))158#@run_async159#def kemonomimi(update, context):160# msg = update.effective_message161# target = "kemonomimi"162# msg.reply_photo(nekos.img(target))163#@run_async164#def avatarlewd(update, context):165# msg = update.effective_message166# target = "nsfw_avatar"167# with open("temp.png", "wb") as f:168# f.write(requests.get(nekos.img(target)).content)169# img = Image.open("temp.png")170# img.save("temp.webp", "webp")171# msg.reply_document(open("temp.webp", "rb"))172# os.remove("temp.webp")173#@run_async174#def gasm(update, context):175# msg = update.effective_message176# target = "gasm"177# with open("temp.png", "wb") as f:178# f.write(requests.get(nekos.img(target)).content)179# img = Image.open("temp.png")180# img.save("temp.webp", "webp")181# msg.reply_document(open("temp.webp", "rb"))182# os.remove("temp.webp")183@run_async184def poke(update, context):185 msg = update.effective_message186 target = "poke"187 msg.reply_video(nekos.img(target))188#@run_async189#def anal(update, context):190# msg = update.effective_message191# target = "anal"192# msg.reply_video(nekos.img(target))193#@run_async194#def hentai(update, context):195# msg = update.effective_message196# target = "hentai"197# msg.reply_photo(nekos.img(target))198#@run_async199#def avatar(update, context):200# msg = update.effective_message201# target = "nsfw_avatar"202# with open("temp.png", "wb") as f:203# f.write(requests.get(nekos.img(target)).content)204# img = Image.open("temp.png")205# img.save("temp.webp", "webp")206# msg.reply_document(open("temp.webp", "rb"))207# os.remove("temp.webp")208#@run_async209#def erofeet(update, context):210# msg = update.effective_message211# target = "erofeet"212# msg.reply_photo(nekos.img(target))213#@run_async214#def holo(update, context):215# msg = update.effective_message216# target = "holo"217# msg.reply_photo(nekos.img(target))218# def keta(update, context):219# msg = update.effective_message220# target = 'keta'221# if not target:222# msg.reply_text("No URL was received from the API!")223# return224# msg.reply_photo(nekos.img(target))225#@run_async226#def pussygif(update, context):227# msg = update.effective_message228# target = "pussy"229# msg.reply_video(nekos.img(target))230#@run_async231#def tits(update, context):232# msg = update.effective_message233# target = "tits"234# msg.reply_photo(nekos.img(target))235#@run_async236#def holoero(update, context):237# msg = update.effective_message238# target = "holoero"239# msg.reply_photo(nekos.img(target))240#@run_async241#def pussy(update, context):242# msg = update.effective_message243# target = "pussy_jpg"244# msg.reply_photo(nekos.img(target))245#@run_async246#def hentaigif(update, context):247# msg = update.effective_message248# target = "random_hentai_gif"249# msg.reply_video(nekos.img(target))250#@run_async251#def classic(update, context):252# msg = update.effective_message253# target = "classic"254# msg.reply_video(nekos.img(target))255#@run_async256#def kuni(update, context):257# msg = update.effective_message258# target = "kuni"259# msg.reply_video(nekos.img(target))260@run_async261def waifu(update, context):262 msg = update.effective_message263 target = "waifu"264 with open("temp.png", "wb") as f:265 f.write(requests.get(nekos.img(target)).content)266 img = Image.open("temp.png")267 img.save("temp.webp", "webp")268 msg.reply_document(open("temp.webp", "rb"))269 os.remove("temp.webp")270@run_async271def kiss(update, context):272 msg = update.effective_message273 target = "kiss"274 msg.reply_video(nekos.img(target))275#@run_async276#def femdom(update, context):277# msg = update.effective_message278# target = "femdom"279# msg.reply_photo(nekos.img(target))280@run_async281def hug(update, context):282 msg = update.effective_message283 target = "cuddle"284 msg.reply_video(nekos.img(target))285#@run_async286#def erok(update, context):287# msg = update.effective_message288# target = "erok"289# msg.reply_photo(nekos.img(target))290@run_async291def foxgirl(update, context):292 msg = update.effective_message293 target = "fox_girl"294 msg.reply_photo(nekos.img(target))295#@run_async296#def titsgif(update, context):297# msg = update.effective_message298# target = "boobs"299# msg.reply_video(nekos.img(target))300#@run_async301#def ero(update, context):302# msg = update.effective_message303# target = "ero"304# msg.reply_photo(nekos.img(target))305@run_async306def smug(update, context):307 msg = update.effective_message308 target = "smug"309 msg.reply_video(nekos.img(target))310@run_async311def baka(update, context):312 msg = update.effective_message313 target = "baka"314 msg.reply_video(nekos.img(target))315#@run_async316#def dva(update, context):317# msg = update.effective_message318# nsfw = requests.get("https://api.computerfreaker.cf/v1/dva").json()319# url = nsfw.get("url")320 # do shit with url if you want to321# if not url:322# msg.reply_text("No URL was received from the API!")323# return324# msg.reply_photo(url)325#LEWDKEMO_HANDLER = CommandHandler("lewdkemo", lewdkemo)326NEKO_HANDLER = CommandHandler("neko", neko)327#FEET_HANDLER = CommandHandler("feet", feet)328#YURI_HANDLER = CommandHandler("yuri", yuri)329#TRAP_HANDLER = CommandHandler("trap", trap)330#FUTANARI_HANDLER = CommandHandler("futanari", futanari)331#HOLOLEWD_HANDLER = CommandHandler("hololewd", hololewd)332#SOLOGIF_HANDLER = CommandHandler("sologif", sologif)333#CUMGIF_HANDLER = CommandHandler("cumgif", cumgif)334#EROKEMO_HANDLER = CommandHandler("erokemo", erokemo)335LESBIAN_HANDLER = CommandHandler("lesbian", lesbian)336#WALLPAPER_HANDLER = CommandHandler("wallpaper", wallpaper)337#LEWDK_HANDLER = CommandHandler("lewdk", lewdk)338#NGIF_HANDLER = CommandHandler("ngif", ngif)339TICKLE_HANDLER = CommandHandler("tickle", tickle)340#LEWD_HANDLER = CommandHandler("lewd", lewd)341FEED_HANDLER = CommandHandler("feed", feed)342#EROYURI_HANDLER = CommandHandler("eroyuri", eroyuri)343#ERON_HANDLER = CommandHandler("eron", eron)344#CUM_HANDLER = CommandHandler("cum", cum)345#BJGIF_HANDLER = CommandHandler("bjgif", bjgif)346#BJ_HANDLER = CommandHandler("bj", bj)347#NEKONSFW_HANDLER = CommandHandler("nekonsfw", nekonsfw)348#SOLO_HANDLER = CommandHandler("solo", solo)349#KEMONOMIMI_HANDLER = CommandHandler("kemonomimi", kemonomimi)350#AVATARLEWD_HANDLER = CommandHandler("avatarlewd", avatarlewd)351#GASM_HANDLER = CommandHandler("gasm", gasm)352POKE_HANDLER = CommandHandler("poke", poke)353#ANAL_HANDLER = CommandHandler("anal", anal)354#HENTAI_HANDLER = CommandHandler("hentai", hentai)355#AVATAR_HANDLER = CommandHandler("avatar", avatar)356#EROFEET_HANDLER = CommandHandler("erofeet", erofeet)357#HOLO_HANDLER = CommandHandler("holo", holo)358#TITS_HANDLER = CommandHandler("tits", tits)359#PUSSYGIF_HANDLER = CommandHandler("pussygif", pussygif)360#HOLOERO_HANDLER = CommandHandler("holoero", holoero)361#PUSSY_HANDLER = CommandHandler("pussy", pussy)362#HENTAIGIF_HANDLER = CommandHandler("hentaigif", hentaigif)363#CLASSIC_HANDLER = CommandHandler("classic", classic)364#KUNI_HANDLER = CommandHandler("kuni", kuni)365WAIFU_HANDLER = CommandHandler("waifu", waifu)366#LEWD_HANDLER = CommandHandler("lewd", lewd)367KISS_HANDLER = CommandHandler("kiss", kiss)368#FEMDOM_HANDLER = CommandHandler("femdom", femdom)369CUDDLE_HANDLER = CommandHandler("hug", hug)370#EROK_HANDLER = CommandHandler("erok", erok)371FOXGIRL_HANDLER = CommandHandler("foxgirl", foxgirl)372#TITSGIF_HANDLER = CommandHandler("titsgif", titsgif)373#ERO_HANDLER = CommandHandler("ero", ero)374SMUG_HANDLER = CommandHandler("smug", smug)375BAKA_HANDLER = CommandHandler("baka", baka)376#DVA_HANDLER = CommandHandler("dva", dva)377#dispatcher.add_handler(LEWDKEMO_HANDLER)378dispatcher.add_handler(NEKO_HANDLER)379#dispatcher.add_handler(FEET_HANDLER)380#dispatcher.add_handler(YURI_HANDLER)381#dispatcher.add_handler(TRAP_HANDLER)382#dispatcher.add_handler(FUTANARI_HANDLER)383#dispatcher.add_handler(HOLOLEWD_HANDLER)384#dispatcher.add_handler(SOLOGIF_HANDLER)385#dispatcher.add_handler(CUMGIF_HANDLER)386#dispatcher.add_handler(EROKEMO_HANDLER)387dispatcher.add_handler(LESBIAN_HANDLER)388#dispatcher.add_handler(WALLPAPER_HANDLER)389#dispatcher.add_handler(LEWDK_HANDLER)390#dispatcher.add_handler(NGIF_HANDLER)391dispatcher.add_handler(TICKLE_HANDLER)392#dispatcher.add_handler(LEWD_HANDLER)393dispatcher.add_handler(FEED_HANDLER)394#dispatcher.add_handler(EROYURI_HANDLER)395#dispatcher.add_handler(ERON_HANDLER)396#dispatcher.add_handler(CUM_HANDLER)397#dispatcher.add_handler(BJGIF_HANDLER)398#dispatcher.add_handler(BJ_HANDLER)399#dispatcher.add_handler(NEKONSFW_HANDLER)400#dispatcher.add_handler(SOLO_HANDLER)401#dispatcher.add_handler(KEMONOMIMI_HANDLER)402#dispatcher.add_handler(AVATARLEWD_HANDLER)403#dispatcher.add_handler(GASM_HANDLER)404dispatcher.add_handler(POKE_HANDLER)405#dispatcher.add_handler(ANAL_HANDLER)406#dispatcher.add_handler(HENTAI_HANDLER)407#dispatcher.add_handler(AVATAR_HANDLER)408#dispatcher.add_handler(EROFEET_HANDLER)409#dispatcher.add_handler(HOLO_HANDLER)410#dispatcher.add_handler(TITS_HANDLER)411#dispatcher.add_handler(PUSSYGIF_HANDLER)412#dispatcher.add_handler(HOLOERO_HANDLER)413#dispatcher.add_handler(PUSSY_HANDLER)414#dispatcher.add_handler(HENTAIGIF_HANDLER)415#dispatcher.add_handler(CLASSIC_HANDLER)416#dispatcher.add_handler(KUNI_HANDLER)417dispatcher.add_handler(WAIFU_HANDLER)418#dispatcher.add_handler(LEWD_HANDLER)419dispatcher.add_handler(KISS_HANDLER)420#dispatcher.add_handler(FEMDOM_HANDLER)421dispatcher.add_handler(CUDDLE_HANDLER)422#dispatcher.add_handler(EROK_HANDLER)423dispatcher.add_handler(FOXGIRL_HANDLER)424#dispatcher.add_handler(TITSGIF_HANDLER)425#dispatcher.add_handler(ERO_HANDLER)426dispatcher.add_handler(SMUG_HANDLER)427dispatcher.add_handler(BAKA_HANDLER)428#dispatcher.add_handler(DVA_HANDLER)429__handlers__ = [430 #NEKO_HANDLER,431 #FEET_HANDLER,432 #YURI_HANDLER,433 #TRAP_HANDLER,434 #FUTANARI_HANDLER,435 #HOLOLEWD_HANDLER,436 #SOLOGIF_HANDLER,437 #CUMGIF_HANDLER,438 #EROKEMO_HANDLER,439 LESBIAN_HANDLER,440 #WALLPAPER_HANDLER,441 #LEWDK_HANDLER,442 #NGIF_HANDLER,443 TICKLE_HANDLER,444 #LEWD_HANDLER,445 FEED_HANDLER,446 #EROYURI_HANDLER,447 #ERON_HANDLER,448 #CUM_HANDLER,449 #BJGIF_HANDLER,450 #BJ_HANDLER,451 #NEKONSFW_HANDLER,452 #SOLO_HANDLER,453 #KEMONOMIMI_HANDLER,454 #AVATARLEWD_HANDLER,455 #GASM_HANDLER,456 POKE_HANDLER,457 #ANAL_HANDLER,458 #HENTAI_HANDLER,459 #AVATAR_HANDLER,460 #EROFEET_HANDLER,461 #HOLO_HANDLER,462 #TITS_HANDLER,463 #PUSSYGIF_HANDLER,464 #HOLOERO_HANDLER,465 #PUSSY_HANDLER,466 #HENTAIGIF_HANDLER,467 #CLASSIC_HANDLER,468 #KUNI_HANDLER,469 WAIFU_HANDLER,470 #LEWD_HANDLER,471 KISS_HANDLER,472 #FEMDOM_HANDLER,473 #LEWDKEMO_HANDLER,474 CUDDLE_HANDLER,475 #EROK_HANDLER,476 FOXGIRL_HANDLER,477 #TITSGIF_HANDLER,478 #ERO_HANDLER,479 SMUG_HANDLER,480 BAKA_HANDLER,481 #DVA_HANDLER,...

Full Screen

Full Screen

decorators.py

Source:decorators.py Github

copy

Full Screen

1from ElisaBot.modules.disable import (2 DisableAbleCommandHandler,3 DisableAbleMessageHandler,4)5from telegram.ext import (6 CommandHandler,7 MessageHandler,8 CallbackQueryHandler,9 InlineQueryHandler,10)11from telegram.ext.filters import MessageFilter12from ElisaBot import dispatcher as d, LOGGER13from typing import Optional, Union, List14class EmikoHandler:15 def __init__(self, d):16 self._dispatcher = d17 def command(18 self,19 command: str,20 filters: Optional[MessageFilter] = None,21 admin_ok: bool = False,22 pass_args: bool = False,23 pass_chat_data: bool = False,24 run_async: bool = True,25 can_disable: bool = True,26 group: Optional[Union[int,str]] = 40,27 ):28 def _command(func):29 try:30 if can_disable:31 self._dispatcher.add_handler(32 DisableAbleCommandHandler(33 command,34 func,35 filters=filters,36 run_async=run_async,37 pass_args=pass_args,38 admin_ok=admin_ok,39 ),40 group,41 )42 else:43 self._dispatcher.add_handler(44 CommandHandler(45 command,46 func,47 filters=filters,48 run_async=run_async,49 pass_args=pass_args,50 ),51 group,52 )53 LOGGER.debug(54 f"[EMIKOCMD] Loaded handler {command} for function {func.__name__} in group {group}"55 )56 except TypeError:57 if can_disable:58 self._dispatcher.add_handler(59 DisableAbleCommandHandler(60 command,61 func,62 filters=filters,63 run_async=run_async,64 pass_args=pass_args,65 admin_ok=admin_ok,66 pass_chat_data=pass_chat_data,67 )68 )69 else:70 self._dispatcher.add_handler(71 CommandHandler(72 command,73 func,74 filters=filters,75 run_async=run_async,76 pass_args=pass_args,77 pass_chat_data=pass_chat_data,78 )79 )80 LOGGER.debug(81 f"[EMIKOCMD] Loaded handler {command} for function {func.__name__}"82 )83 return func84 return _command85 def message(86 self,87 pattern: Optional[str] = None,88 can_disable: bool = True,89 run_async: bool = True,90 group: Optional[Union[int,str]] = 60,91 friendly=None,92 ):93 def _message(func):94 try:95 if can_disable:96 self._dispatcher.add_handler(97 DisableAbleMessageHandler(98 pattern, func, friendly=friendly, run_async=run_async99 ),100 group,101 )102 else:103 self._dispatcher.add_handler(104 MessageHandler(pattern, func, run_async=run_async), group105 )106 LOGGER.debug(107 f"[EMIKOMSG] Loaded filter pattern {pattern} for function {func.__name__} in group {group}"108 )109 except TypeError:110 if can_disable:111 self._dispatcher.add_handler(112 DisableAbleMessageHandler(113 pattern, func, friendly=friendly, run_async=run_async114 )115 )116 else:117 self._dispatcher.add_handler(118 MessageHandler(pattern, func, run_async=run_async)119 )120 LOGGER.debug(121 f"[EMIKOMSG] Loaded filter pattern {pattern} for function {func.__name__}"122 )123 return func124 return _message125 def callbackquery(self, pattern: str = None, run_async: bool = True):126 def _callbackquery(func):127 self._dispatcher.add_handler(128 CallbackQueryHandler(129 pattern=pattern, callback=func, run_async=run_async130 )131 )132 LOGGER.debug(133 f"[EMIKOCALLBACK] Loaded callbackquery handler with pattern {pattern} for function {func.__name__}"134 )135 return func136 return _callbackquery137 def inlinequery(138 self,139 pattern: Optional[str] = None,140 run_async: bool = True,141 pass_user_data: bool = True,142 pass_chat_data: bool = True,143 chat_types: List[str] = None,144 ):145 def _inlinequery(func):146 self._dispatcher.add_handler(147 InlineQueryHandler(148 pattern=pattern,149 callback=func,150 run_async=run_async,151 pass_user_data=pass_user_data,152 pass_chat_data=pass_chat_data,153 chat_types=chat_types,154 )155 )156 LOGGER.debug(157 f"[EMIKOINLINE] Loaded inlinequery handler with pattern {pattern} for function {func.__name__} | PASSES USER DATA: {pass_user_data} | PASSES CHAT DATA: {pass_chat_data} | CHAT TYPES: {chat_types}"158 )159 return func160 return _inlinequery161emikocmd = EmikoHandler(d).command162emikomsg = EmikoHandler(d).message163emikocallback = EmikoHandler(d).callbackquery...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run lisa automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful