2
0
mirror of https://github.com/Nick80835/microbot synced 2025-08-31 22:46:01 +00:00

switch to slightly more reliable admin check

This commit is contained in:
Nick80835
2020-06-20 09:40:28 -04:00
parent 1c6f9119e9
commit 6dee37c81f

View File

@@ -204,7 +204,9 @@ class CommandHandler():
return False
async def is_admin(self, event):
async for user in event.client.iter_participants(event.chat, limit=10000, filter=types.ChannelParticipantsAdmins):
admin_list = await event.client.get_participants(event.chat, filter=types.ChannelParticipantsAdmins)
for user in admin_list:
if user.id == event.from_id:
return True