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 yuri(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 = "yuri" msg.reply_photo(nekos.img(target))
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 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 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 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("NSFW Mode is already Deactivated") return "" else: sql.rem_nsfw(chat.id) msg.reply_text("Rolled Back to SFW Mode!") message = ( f"<b>{html.escape(chat.title)}:</b>\n" f"DEACTIVATED_NSFW\n" f"<b>Admin:</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("Activated NSFW Mode!") message = ( f"<b>{html.escape(chat.title)}:</b>\n" f"ACTIVATED_NSFW\n" f"<b>Admin:</b> {mention_html(user.id, html.escape(user.first_name))}\n" ) return message else: msg.reply_text("NSFW Mode is already Activated for this chat!") return ""