def trap(update, context): chat_id = update.effective_chat.id if not update.effective_message.chat.type == "private": is_nsfw = sql.is_nsfw(chat_id) if not is_nsfw: return msg = update.effective_message target = "trap" msg.reply_photo(nekos.img(target))
def titsgif(update, context): chat_id = update.effective_chat.id if not update.effective_message.chat.type == "private": is_nsfw = sql.is_nsfw(chat_id) if not is_nsfw: return msg = update.effective_message target = "boobs" msg.reply_video(nekos.img(target))
def rem_nsfw(update: Update, context: CallbackContext): msg = update.effective_message chat = update.effective_chat user = update.effective_user is_nsfw = sql.is_nsfw(chat.id) if chat.type == "private": msg.reply_text("Esta funcion solo está disponible en grupos") if not is_nsfw: msg.reply_text("El modo NSFW ya está desactivado") else: sql.rem_nsfw(chat.id) msg.reply_text("Modo NSFW desactivado!")
def keta(update, context): chat_id = update.effective_chat.id if not update.effective_message.chat.type == "private": is_nsfw = sql.is_nsfw(chat_id) if not is_nsfw: return msg = update.effective_message target = "keta" if not target: msg.reply_text("No URL was received from the API!") return msg.reply_photo(nekos.img(target))
def add_nsfw(update: Update, context: CallbackContext): chat = update.effective_chat msg = update.effective_message user = update.effective_user # Remodified by @EverythingSuckz is_nsfw = sql.is_nsfw(chat.id) if chat.type == "private": msg.reply_text( "El modo NSFW está activado en chats privados por defecto.") if not is_nsfw: sql.set_nsfw(chat.id) msg.reply_text("Modo NSFW activado!") else: msg.reply_text("El modo NSFW ya está activado para este chat!")
def gasm(update, context): chat_id = update.effective_chat.id if not update.effective_message.chat.type == "private": is_nsfw = sql.is_nsfw(chat_id) if not is_nsfw: return msg = update.effective_message target = "gasm" with open("temp.png", "wb") as f: f.write(requests.get(nekos.img(target)).content) img = Image.open("temp.png") img.save("temp.webp", "webp") msg.reply_document(open("temp.webp", "rb")) os.remove("temp.webp")
def dva(update, context): chat_id = update.effective_chat.id if not update.effective_message.chat.type == "private": is_nsfw = sql.is_nsfw(chat_id) if not is_nsfw: return msg = update.effective_message nsfw = requests.get("https://api.computerfreaker.cf/v1/dva").json() url = nsfw.get("url") # do shit with url if you want to if not url: msg.reply_text("No URL was received from the API!") return msg.reply_photo(url)
def rem_nsfw(update: Update, context: CallbackContext): msg = update.effective_message chat = update.effective_chat user = update.effective_user is_nsfw = sql.is_nsfw(chat.id) if not is_nsfw: msg.reply_text("El modo NSFW ya está desactivado") return "" else: sql.rem_nsfw(chat.id) msg.reply_text("Modo NSFW desactivado!") message = ( f"<b>{html.escape(chat.title)}:</b>\n" f"#NSFW_Desactivado\n" f"<b>Administrador:</b> {mention_html(user.id, html.escape(user.first_name))}\n" ) return message
def add_nsfw(update: Update, context: CallbackContext): chat = update.effective_chat msg = update.effective_message user = update.effective_user #Remodified by @EverythingSuckz is_nsfw = sql.is_nsfw(chat.id) if not is_nsfw: sql.set_nsfw(chat.id) msg.reply_text("Modo NSFW activado!") message = ( f"<b>{html.escape(chat.title)}:</b>\n" f"#NSFW_Activado\n" f"<b>Administrador:</b> {mention_html(user.id, html.escape(user.first_name))}\n" ) return message else: msg.reply_text("El modo NSFW ya está activado para este chat!") return ""
def dva(update, context): chat_id = update.effective_chat.id if not update.effective_message.chat.type == "private": is_nsfw = sql.is_nsfw(chat_id) if not is_nsfw: return msg = update.effective_message headers = { "User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:71.0) Gecko/20100101 Firefox/71.0", } nsfw = requests.post("https://api.computerfreaker.cf/v1/dva", headers=headers) nsfw.raise_for_status() nsfw = nsfw.json() url = nsfw.get("url") # do shit with url if you want to if not url: msg.reply_text("No URL was received from the API!") return try: msg.reply_photo(url) except BadRequest: msg.reply_text("A veces no funciona ¯\_(ツ)_/¯ \n sigue intentando.. ")