
    N[i
                     T    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      Zy)    N)UnionListIterable)raw)typesc            
       L    e Zd Zdddeeeeeeef      f   deded   f   fdZy)GetUsersselfzpyrogram.Clientuser_idsreturnz
types.Userc                    K   t        |t        t        f       }|rt        |      n|g}t	        j
                  |D cg c]  }| j                  |       c}  d{   }| j                  t        j                  j                  j                  |             d{   }t        j                         }|D ]1  }|j                  t        j                  j!                  | |             3 |r|S |d   S c c}w 7 7 ^w)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])
        N)idr   )
isinstanceintstrlistasynciogatherresolve_peerinvoker   	functionsusersr	   r   r   appendUser_parse)r
   r   is_iterableirr   s         S/var/www/files/kim/lib/python3.12/site-packages/pyrogram/methods/users/get_users.py	get_userszGetUsers.get_users   s     8 %XSz::%04>xj )Q1$*;*;A*>)QRR++MM(( ) 
 
 

 	5ALL**434	5 $u1q1 *RR
s0   ;C>C5C>C:A C>C<AC><C>N)	__name__
__module____qualname__r   r   r   r   r   r         r   r	   r	      sI    +2+2S(5c?";;<+2 
|T,//	0+2r%   r	   )	r   typingr   r   r   pyrogramr   r   r	   r$   r%   r   <module>r(      s#   &  ( (   ,2 ,2r%   