o
    -˜Žj¤
  ã                   @   sN   d dl Z d dlmZmZmZ d dlZd dlmZ d dlmZ G dd„ dƒZdS )é    N)ÚUnionÚListÚIterable)Úraw)Útypesc                
   @   sD   e Zd Zdddeeeeeeef  f deded f fdd„ZdS )	ÚGetUsersÚselfzpyrogram.ClientÚuser_idsÚreturnz
types.Userc                 ƒ   s”   �t |ttfƒ }|rt|ƒn|g}tj‡ fdd„|D ƒŽ I dH }ˆ  tjj	j
|d�¡I dH }t ¡ }|D ]}| tj ˆ |¡¡ q5|rF|S |d S )aö  Get information about a user.
        You can retrieve up to 200 users at once.

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

        Parameters:
            user_ids (``int`` | ``str`` | Iterable of ``int`` or ``str``):
                A list of User identifiers (id or username) or a single user id/username.
                For a contact that exists in your Telegram address book you can use his phone number (str).
                You can also use user profile link in form of *t.me/<username>* (str).

        Returns:
            :obj:`~pyrogram.types.User` | List of :obj:`~pyrogram.types.User`: In case *user_ids* was not a list,
            a single user is returned, otherwise a list of users is returned.

        Example:
            .. code-block:: python

                # Get information about one user
                await app.get_users("me")

                # Get information about multiple users at once
                await app.get_users([user_id1, user_id2, user_id3])
        c                    s   g | ]}ˆ   |¡‘qS © )Úresolve_peer)Ú.0Úi©r   r   ú]/var/www/kodo/Anonymous/send/lib/python3.10/site-packages/pyrogram/methods/users/get_users.pyÚ
<listcomp><   s    z&GetUsers.get_users.<locals>.<listcomp>N)Úidr   )Ú
isinstanceÚintÚstrÚlistÚasyncioÚgatherÚinvoker   Ú	functionsÚusersr   r   r   ÚappendÚUserÚ_parse)r   r	   Úis_iterableÚrr   r   r   r   r   Ú	get_users   s   €ÿ
ÿzGetUsers.get_usersN)	Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r!   r   r   r   r   r      s    ÿþýr   )	r   Útypingr   r   r   Úpyrogramr   r   r   r   r   r   r   Ú<module>   s   