diff --git a/userge/plugins/botlist/status.py b/userge/plugins/botlist/status.py index 747a23854..4076ad627 100644 --- a/userge/plugins/botlist/status.py +++ b/userge/plugins/botlist/status.py @@ -18,28 +18,28 @@ @pyrogram.Client.on_message(pyrogram.filters.command(["checkstatus"]) # Reply on /checkstatus command async def check_status(client, message): - first_msg = "Bots Status...\n\n" - msg = await message.reply_text(first_msg, parse_mode="html") - bots = ["WhiteEyeRenameBot", "WhiteEyeURLUploaderBot", "WhiteEyeTelegraphBot", "WhiteEyeLinkToFileBot", "WhiteEyeSubtitleBot", "WhiteEyeYouTubeBot", "WhiteEyeForceSubscriberBot", "whiteeyegdrivebot", "WhiteEyeTagRemoverBot", "WhiteEyeUltraTonBot", "WhiteEyeDeleteAllBot", "WhiteEyeCompressorBot", "Miss_ArantxaBot"] #List of your bots - - for bot in bots: - checking = f"⭕️ {bot} Status : ♻️\n\n" - first_msg += checking - await msg.edit_text(first_msg,parse_mode="html") - send = await client.send_message(bot, '/start') - time.sleep(8) #You can change it if you need to increase Checking time. - bot_msg = await client.get_history(bot, 1) - - if send.message_id == bot_msg[0].message_id: - nice = f"⭕️ {bot} Status : ❌\n\n" - else: - nice = f"⭕️ {bot} Status : ✅\n\n" - - first_msg = first_msg.replace(checking, nice) - await msg.edit_text(first_msg,parse_mode="html") - await client.read_history(bot) - - tz = pytz.timezone('Asia/Kolkata') - time_now = datetime.utcnow().astimezone(tz=tz).strftime("%I:%M %p - %d %B %Y") - first_msg += f"[Updated on : {time_now} IST]" - await msg.edit_text(first_msg,parse_mode="html") +first_msg = "Bots Status...\n\n" +msg = await message.reply_text(first_msg, parse_mode="html") +bots = [["WhiteEyeRenameBot", "WhiteEyeURLUploaderBot", "WhiteEyeTelegraphBot", "WhiteEyeLinkToFileBot", "WhiteEyeSubtitleBot", "WhiteEyeYouTubeBot", "WhiteEyeForceSubscriberBot", "whiteeyegdrivebot", "WhiteEyeTagRemoverBot", "WhiteEyeUltraTonBot", "WhiteEyeDeleteAllBot", "WhiteEyeCompressorBot", "Miss_ArantxaBot"] #List of your bots + +for bot in bots: + checking = f"⭕️ {bot} Status : ♻️\n\n" + first_msg += checking + await msg.edit_text(first_msg,parse_mode="html") + send = user_client.send_message(bot, '/start') + time.sleep(8) #You can change it if you need to increase Checking time. + bot_msg = user_client.get_history(bot, 1) + + if send.message_id == bot_msg[0].message_id: + nice = f"⭕️ {bot} Status : ❌\n\n" + else: + nice = f"⭕️ {bot} Status : ✅\n\n" + + first_msg = first_msg.replace(checking, nice) + await msg.edit_text(first_msg,parse_mode="html") + user_client.read_history(bot) + +tz = timezone('Asia/Kolkata') +time_now = datetime.utcnow().astimezone(tz=tz).strftime("%I:%M %p - %d %B %Y") +first_msg += f"[Updated on : {time_now} IST]" +await msg.edit_text(first_msg,parse_mode="html")