mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-04 19:24:51 +00:00
cache admin
This commit is contained in:
parent
ee27bcd992
commit
8f12521220
1 changed files with 2 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
from functools import partial, wraps
|
from functools import partial, wraps
|
||||||
from time import time
|
from time import time
|
||||||
from traceback import format_exc as err
|
from traceback import format_exc as err
|
||||||
|
from cachetools import TTLCache
|
||||||
from typing import Optional, Union
|
from typing import Optional, Union
|
||||||
|
|
||||||
from pyrogram import Client, enums
|
from pyrogram import Client, enums
|
||||||
|
|
@ -86,7 +87,7 @@ async def check_perms(
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
admins_in_chat = {}
|
admins_in_chat = TTLCache(maxsize=1000, ttl=6*60*60)
|
||||||
|
|
||||||
|
|
||||||
async def list_admins(chat_id: int):
|
async def list_admins(chat_id: int):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue