Untitled
unknown
plain_text
4 years ago
837 B
15
Indexable
from pyrogram import Client, filters from time import sleep import asyncio from pyrogram.types import ( ReplyKeyboardMarkup, InlineKeyboardMarkup, InlineKeyboardButton) app = Client("my_account") @app.on_message(filters.command('get')) async def print_msg(Client, msg): ##timon = msg.command[2] ##print(timon) print("hery") last_saved_msg = await app.get_history(msg.command[1], limit=100) for i in last_saved_msg: try: url = i.reply_markup.inline_keyboard[0][0].url user_id = url.split("=")[1] user = await app.get_users(user_id) if "long_time_ago" in user.status: print("The account " + user.username + "is down") else: print("The account " + user.username + "is still alive") except: print("Err")
Editor is loading...