Skip to content

Commit

Permalink
Update status.py
Browse files Browse the repository at this point in the history
  • Loading branch information
drsyed1 authored Jan 6, 2021
1 parent 26f7a33 commit 5f36aea
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions userge/plugins/botlist/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,28 @@

@pyrogram.Client.on_message(pyrogram.filters.command(["checkstatus"]) # Reply on /checkstatus command
async def check_status(client, message):
first_msg = "<b>Bots Status...</b>\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"<b>⭕️ {bot} Status : ♻️</b>\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"<b>⭕️ {bot} Status : ❌</b>\n\n"
else:
nice = f"<b>⭕️ {bot} Status : ✅</b>\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"<code>[Updated on : {time_now} IST]</code>"
await msg.edit_text(first_msg,parse_mode="html")
first_msg = "<b>Bots Status...</b>\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"<b>⭕️ {bot} Status : ♻️</b>\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"<b>⭕️ {bot} Status : ❌</b>\n\n"
else:
nice = f"<b>⭕️ {bot} Status : ✅</b>\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"<code>[Updated on : {time_now} IST]</code>"
await msg.edit_text(first_msg,parse_mode="html")

0 comments on commit 5f36aea

Please sign in to comment.