import asyncdispatch, telebot, options, strutils, random, re, unicode, os import cmd/stats randomize() proc updateHandler* (bot: Telebot, update: Update): Future[bool] {.async.} = if not update.message.isNone: var message = update.message.get discard statsHandler(message, false) if message.text.isSome: let text = message.text.get let lewdAnswers = [ "Höhö! Penis!", "Schwaaaaaanz!", "Gihihihi, Pimmel!", "Höhö, Döödel!", "Glied", "8===D", ] let meowAnswers = [ "meow USER!", "Meow USER!", "Mew USER!", "mew USER!", "meow USER", "Meow USER", "Mew USER", "mew USER", "mreow USER!", "Mreow USER!", "Mrew USER!", "mrew USER!", "mreow USER", "Mreow USER", "Mrew USER", "mrew USER", ] let penisCount = text.normalize.count("penis") # if much penis send a pic if penisCount > 4: discard statsHandler(message, true) discard await bot.sendPhoto(message.chat.id, "file://" & getEnv("ASSETS_PATH") & "/pics/penis.jpg", replyToMessageId = message.messageId) #if not so much penis send a random lewd message elif penisCount > 0: discard statsHandler(message, true) discard await bot.sendMessage(message.chat.id, sample(lewdAnswers), replyToMessageId = message.messageId) #if sinep send a random dwel string elif text.normalize.contains("sinep"): discard await bot.sendMessage(message.chat.id, reversed(sample(lewdAnswers)), replyToMessageId = message.messageId) #if text is "egg_irl" send a real egg! elif text == "egg_irl": discard await bot.sendPhoto(message.chat.id, "file://" & getEnv("ASSETS_PATH") & "/pics/egg.jpg", replyToMessageId = message.messageId) #meow back at people with a 20% chance if (rand(100) < 20 or message.chat.kind == "private") and text.contains(re(r"^mr*(a+u+|e*[eo]o*w+)!*$", {reIgnoreCase})): discard await bot.sendMessage(message.chat.id, sample(meowAnswers).replace("USER", message.fromUser.get.firstName), replyToMessageId = message.messageId)