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:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user