o
    -˜Žj�  ã                   @   sP   d dl Z d dlmZ d dlZd dlmZ d dlmZ e  e¡ZG dd„ dƒZ	dS )é    N)ÚList)Úraw)Útypesc                   @   s"   e Zd Zddded fdd„ZdS )ÚGetContactsÚselfzpyrogram.ClientÚreturnz
types.Userc                 ƒ   s8   �ˆ   tjjjdd�¡I dH }t ‡ fdd„|jD ƒ¡S )aa  Get contacts from your Telegram address book.

        .. include:: /_includes/usable-by/users.rst

        Returns:
            List of :obj:`~pyrogram.types.User`: On success, a list of users is returned.

        Example:
            .. code-block:: python

                contacts = await app.get_contacts()
                print(contacts)
        r   )ÚhashNc                 3   s   � | ]
}t j ˆ |¡V  qd S )N)r   ÚUserÚ_parse)Ú.0Úuser©r   © úc/var/www/kodo/Anonymous/send/lib/python3.10/site-packages/pyrogram/methods/contacts/get_contacts.pyÚ	<genexpr>0   s   € z+GetContacts.get_contacts.<locals>.<genexpr>)Úinvoker   Ú	functionsÚcontactsr   r   r   Úusers)r   r   r   r   r   Úget_contacts   s   €zGetContacts.get_contactsN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r   r      s    ÿþr   )
ÚloggingÚtypingr   Úpyrogramr   r   Ú	getLoggerr   Úlogr   r   r   r   r   Ú<module>   s   
