U
    ;g
                     @   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                   @   s@   e Zd Zdeeeeeeef  f eded f dddZdS )GetUserszpyrogram.Clientz
types.User)selfuser_idsreturnc                    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 | qh|r|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).

        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  )Zresolve_peer).0ir   r   `/opt/bot/vods_filmes/script/venv/lib/python3.8/site-packages/pyrogram/methods/users/get_users.py
<listcomp>:   s     z&GetUsers.get_users.<locals>.<listcomp>N)idr   )
isinstanceintstrlistasyncioZgatherZinvoker   Z	functionsusersr   r   r   appendZUser_parse)r   r	   Z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   Zpyrogramr   r   r   r   r   r   r   <module>   s
   