This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
Telegram/app.py

12 lines
496 B
Python
Raw Normal View History

2022-10-26 15:54:55 +03:00
from modules.utils import configGet
from pyrogram.client import Client
app = Client("holochecker", bot_token=configGet("bot_token", "bot"), api_id=configGet("api_id", "bot"), api_hash=configGet("api_hash", "bot"))
async def isAnAdmin(admin_id):
2022-12-11 02:31:06 +02:00
if (admin_id == configGet("owner")) or (admin_id in configGet("admins")):
2022-10-26 15:54:55 +03:00
return True
async for member in app.get_chat_members(configGet("admin_group")):
2022-10-26 15:54:55 +03:00
if member.user.id == admin_id:
return True
return False