mirror of
https://github.com/TeamPGM/PagerMaid-Pyro.git
synced 2024-11-30 23:20:55 +00:00
14 lines
292 B
Python
14 lines
292 B
Python
from datetime import timedelta
|
|
|
|
from pyrogram import Client
|
|
|
|
from pagermaid.common.cache import cache
|
|
|
|
|
|
@cache(ttl=timedelta(hours=1))
|
|
async def get_dialogs_list(client: Client):
|
|
dialogs = []
|
|
async for dialog in client.get_dialogs():
|
|
dialogs.append(dialog)
|
|
return dialogs
|