U
    ;g
                     @   s>   d dl mZ d dlZd dlmZ d dlmZ G dd dZdS )    )UnionN)raw)typesc                   @   s.   e Zd Zddeeef eeeedddZdS )	
AddContact Fzpyrogram.Client)selfuser_id
first_name	last_namephone_numbershare_phone_numberc              	      sD   |  tjjj| |I dH ||||dI dH }tj| |j	d S )a  Add an existing Telegram user as contact, even without a phone number.

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

        Parameters:
            user_id (``int`` | ``str``):
                Unique identifier (int) or username (str) of the target user.

            first_name (``str``):
                User's first name.

            last_name (``str``, *optional*):
                User's last name.

            phone_number (``str``, *optional*):
                User's phone number.

            share_phone_number (``bool``, *optional*):
                Whether or not to share the phone number with the user.
                Defaults to False.

        Returns:
            :obj:`~pyrogram.types.User`: On success the user is returned.

        Example:
            .. code-block:: python

                # Add contact by id
                await app.add_contact(12345678, "Foo")

                # Add contact by username
                await app.add_contact("username", "Bar")
        N)idr	   r
   phoneZadd_phone_privacy_exceptionr   )
Zinvoker   Z	functionsZcontactsr   Zresolve_peerr   ZUser_parseZusers)r   r   r	   r
   r   r   r r   e/opt/bot/vods_filmes/script/venv/lib/python3.8/site-packages/pyrogram/methods/contacts/add_contact.pyadd_contact   s    )

zAddContact.add_contactN)r   r   F)__name__
__module____qualname__r   intstrboolr   r   r   r   r   r      s      
r   )typingr   Zpyrogramr   r   r   r   r   r   r   <module>   s   