azils3/bash
0
1# Ultroid - UserBot2# Copyright (C) 2021-2025 TeamUltroid3#4# This file is a part of < https://github.com/TeamUltroid/Ultroid/ >5# PLease read the GNU Affero General Public License in6# <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.7"""8✘ Commands Available -9 10• `{i}tagall`11 Tag Top 100 Members of chat.12 13• `{i}tagadmins`14 Tag Admins of that chat.15 16• `{i}tagowner`17 Tag Owner of that chat18 19• `{i}tagbots`20 Tag Bots of that chat.21 22• `{i}tagrec`23 Tag recently Active Members.24 25• `{i}tagon`26 Tag online Members(work only if privacy off).27 28• `{i}tagoff`29 Tag Offline Members(work only if privacy off).30"""31 32from telethon.tl.types import ChannelParticipantAdmin as admin33from telethon.tl.types import ChannelParticipantCreator as owner34from telethon.tl.types import UserStatusOffline as off35from telethon.tl.types import UserStatusOnline as onn36from telethon.tl.types import UserStatusRecently as rec37 38from . import inline_mention, ultroid_cmd39 40 41@ultroid_cmd(42 pattern="tag(on|off|all|bots|rec|admins|owner)( (.*)|$)",43 groups_only=True,44)45async def _(e):46 okk = e.text47 lll = e.pattern_match.group(2)48 o = 049 nn = 050 rece = 051 xx = f"{lll}" if lll else ""52 lili = await e.client.get_participants(e.chat_id, limit=99)53 for bb in lili:54 x = bb.status55 y = bb.participant56 if isinstance(x, onn):57 o += 158 if "on" in okk:59 xx += f"\n{inline_mention(bb)}"60 elif isinstance(x, off):61 nn += 162 if "off" in okk and not bb.bot and not bb.deleted:63 xx += f"\n{inline_mention(bb)}"64 elif isinstance(x, rec):65 rece += 166 if "rec" in okk and not bb.bot and not bb.deleted:67 xx += f"\n{inline_mention(bb)}"68 if isinstance(y, owner):69 xx += f"\n꧁{inline_mention(bb)}꧂"70 if isinstance(y, admin) and "admin" in okk and not bb.deleted:71 xx += f"\n{inline_mention(bb)}"72 if "all" in okk and not bb.bot and not bb.deleted:73 xx += f"\n{inline_mention(bb)}"74 if "bot" in okk and bb.bot:75 xx += f"\n{inline_mention(bb)}"76 await e.eor(xx)77 