merge pull request #8 from lntechnical2/patch-1

control flood wait
This commit is contained in:
levina 2021-09-15 20:45:18 +07:00 committed by GitHub
commit 5ac49926f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,7 @@
import cache.admins import cache.admins
from typing import List from typing import List
import time
from pyrogram.types import Chat from pyrogram.types import Chat
from cache.admins import get as gett from cache.admins import get as gett
from cache.admins import set from cache.admins import set
@ -14,6 +14,7 @@ async def get_administrators(chat: Chat) -> List[int]:
if get: if get:
return get return get
else: else:
time.sleep(3) # control Flood wait
administrators = await chat.get_members(filter="administrators") administrators = await chat.get_members(filter="administrators")
to_set = [] to_set = []