Skip to content

Commit

Permalink
Create botschk.py
Browse files Browse the repository at this point in the history
  • Loading branch information
DAXXTEAM authored Feb 15, 2024
1 parent fdcfaa3 commit 3dba9c2
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions DAXXMUSIC/plugins/bot/botschk.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import asyncio
import random
from pyrogram import filters
from DAXXMUSIC import app
from DAXXMUSIC import *
from ... import ...
from config import OWNER_ID

BOT_LIST = ["IAM_DAXXBOT", "NexikoBot" , "GitWizardBot" , "stringseasonrobot" , "LivioXBot"]



@app.on_message(filters.command("botschk") & filters.user(OWNER_ID))
async def bots_chk(app, message):
msg = await message.reply_photo(photo="https://telegra.ph/file/4d303296e4fac9a40ea07.jpg", caption="**ᴄʜᴇᴄᴋɪɴɢ ʙᴏᴛs sᴛᴀᴛs ᴀʟɪᴠᴇ ᴏʀ ᴅᴇᴀᴅ...**")
response = "**ᴄʜᴇᴄᴋɪɴɢ ʙᴏᴛs sᴛᴀᴛs ᴀʟɪᴠᴇ ᴏʀ ᴅᴇᴀᴅ**\n\n"
for bot_username in BOT_LIST:
try:
bot = await userbot.get_users(bot_username)
bot_id = bot.id
await asyncio.sleep(0.5)
bot_info = await userbot.send_message(bot_id, "/start")
await asyncio.sleep(3)
async for bot_message in userbot.get_chat_history(bot_id, limit=1):
if bot_message.from_user.id == bot_id:
response += f"╭⎋ [{bot.first_name}](tg://user?id={bot.id})\n╰⊚ **sᴛᴀᴛᴜs: ᴏɴʟɪɴᴇ ✨**\n\n"
else:
response += f"╭⎋ [{bot.first_name}](tg://user?id={bot.id})\n╰⊚ **sᴛᴀᴛᴜs: ᴏғғʟɪɴᴇ ❄**\n\n"
except Exception:
response += f"╭⎋ {bot_username}\n╰⊚ **sᴛᴀᴛᴜs: ᴇʀʀᴏʀ ❌**\n"

await msg.edit_text(response)

0 comments on commit 3dba9c2

Please sign in to comment.