def start(message): bot.send_message( message.chat.id, "🌀 You can create your own z̮͈̍͒͆ͅạ͔̠̍̆̿l̖͚͕͂̄͝ĝ͔͉̠̭̍͒͗o̬͉̓͞ ̟̈́t̰̬̜̳̽̄͊̍ex̗͒ť̪ by easily entering your text." ) bot_stats.send_stats(message, statsData, "start", date.isoformat(date.today()), bot)
def checksite(message): bot.reply_to(message, "Proccessing...") url = message.text loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) async def main(url): browser = await pyppeteer.launch(args=['--no-sandbox'], handleSIGINT=False, handleSIGTERM=False, handleSIGHUP=False) page = await browser.newPage() await page.goto(url) await page.setViewport(dict(width=1920, height=1080)) time.sleep(2) await page.screenshot(path="screenshot.png", fullPage=True) await browser.close() try: loop.run_until_complete(main(url)) screen = open("screenshot.png", "rb") bot.send_message(message.chat.id, "And here you go \U0001F609".encode("utf-8")) bot.send_document(message.chat.id, screen) bot_stats.send_stats(message, statsData, "check", date.isoformat(date.today()), bot) screen.close() except NetworkError: bot.send_message(message.chat.id, "ERROR: Invalid link.") bot_stats.send_stats(message, statsData, "invalid", date.isoformat(date.today()), bot)
def start(message): bot.send_message( message.chat.id, "📥 You can send an image as *forwarded message* from any chat/channel or upload it as *Photo* or *File*.", parse_mode="Markdown") bot_stats.send_stats(message, statsData, "start", date.isoformat(date.today()), bot)
def welcome(message): bot.send_message( message.chat.id, "Just simply send me an URL and wait 5-10 seconds \U0001F60C".encode( 'utf-8')) bot_stats.send_stats(message, statsData, "start", date.isoformat(date.today()), bot)
def process_reveal_password_step(message): bot.reply_to(message, '⏳ Ok, now wait a bit...') txt = user_reveal_dict[message.chat.id]["text"] password = message.text try: res = stegcloak.reveal(txt, password) bot.send_message(message.chat.id, "✅ *Done! Here is the result:*", parse_mode="Markdown") bot.send_message(message.chat.id, res) del user_reveal_dict[message.chat.id] bot_stats.send_stats(message, statsData, "reveal_success", date.isoformat(date.today()), bot) except Exception as e: print(e) bot.send_message(message.chat.id, "❌ *Oops... something went wrong.*", parse_mode="Markdown") bot_stats.send_stats(message, statsData, "reveal_error", date.isoformat(date.today()), bot)
def process_password_step(message): bot.reply_to(message, '⏳ Ok, now wait a bit...') secret = user_hide_dict[message.chat.id]["secret"] cover = user_hide_dict[message.chat.id]["cover"] password = message.text try: res = stegcloak.hide(secret, password=password, hide_text=cover) bot.send_message(message.chat.id, "✅ *Done! Here is the result:*", parse_mode="Markdown") bot.send_message(message.chat.id, res) del user_hide_dict[message.chat.id] bot_stats.send_stats(message, statsData, "hide_success", date.isoformat(date.today()), bot) except Exception as e: print(e) bot.send_message(message.chat.id, "❌ *Oops... something went wrong.*", parse_mode="Markdown") bot_stats.send_stats(message, statsData, "hide_error", date.isoformat(date.today()), bot)
def zalgo(message): result = generator.zalgo(message.text) bot.reply_to(message, result) bot_stats.send_stats(message, statsData, "text", date.isoformat(date.today()), bot)
def photo(message): photo_info = bot.get_file(message.photo[-1].file_id) upload(photo_info, message) bot_stats.send_stats(message, statsData, "photo", date.isoformat(date.today()), bot)
def document(message): doc_info = bot.get_file(message.document.file_id) upload(doc_info, message) bot_stats.send_stats(message, statsData, "document", date.isoformat(date.today()), bot)