Improved admin check

This commit is contained in:
Profitroll 2022-12-11 01:31:06 +01:00
parent 12d6273c9a
commit 94bb52ad62
1 changed files with 1 additions and 1 deletions

2
app.py
View File

@ -4,7 +4,7 @@ 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):
if admin_id == configGet("owner") or admin_id in configGet("admins"):
if (admin_id == configGet("owner")) or (admin_id in configGet("admins")):
return True
async for member in app.get_chat_members(configGet("admin_group")):
if member.user.id == admin_id: