U
    ;g                     @   sN   d dl m Z  d dlmZ d dlZd dlmZmZ d dlmZ G dd dZdS )    )datetime)UnionN)rawutils)typesc                   @   sB   e Zd Zd	deeef eeeeeeeeeeed ddddZ	dS )
	SendVenue Nzpyrogram.Client)ztypes.InlineKeyboardMarkupztypes.ReplyKeyboardMarkupztypes.ReplyKeyboardRemoveztypes.ForceReplyztypes.Message)selfchat_idlatitude	longitudetitleaddressfoursquare_idfoursquare_typedisable_notificationreply_to_message_idschedule_dateprotect_contentreply_markupreturnc                    s   |  tjjj| |I dH tjjtjj||d||d||dd|pDd|	| 	 t
|
||rj|| I dH ndd	I dH }|jD ]d}t|tjjtjjtjjfrtjj| |jdd |jD dd |jD t|tjjd	I dH   S qdS )
a	  Send information about a venue.

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

        Parameters:
            chat_id (``int`` | ``str``):
                Unique identifier (int) or username (str) of the target chat.
                For your personal cloud (Saved Messages) you can simply use "me" or "self".
                For a contact that exists in your Telegram address book you can use his phone number (str).

            latitude (``float``):
                Latitude of the venue.

            longitude (``float``):
                Longitude of the venue.

            title (``str``):
                Name of the venue.

            address (``str``):
                Address of the venue.

            foursquare_id (``str``, *optional*):
                Foursquare identifier of the venue.

            foursquare_type (``str``, *optional*):
                Foursquare type of the venue, if known.
                (For example, "arts_entertainment/default", "arts_entertainment/aquarium" or "food/icecream".)

            disable_notification (``bool``, *optional*):
                Sends the message silently.
                Users will receive a notification with no sound.

            reply_to_message_id (``int``, *optional*):
                If the message is a reply, ID of the original message

            schedule_date (:py:obj:`~datetime.datetime`, *optional*):
                Date when the message will be automatically sent.

            protect_content (``bool``, *optional*):
                Protects the contents of the sent message from forwarding and saving.

            reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
                Additional interface options. An object for an inline keyboard, custom reply keyboard,
                instructions to remove reply keyboard or to force a reply from the user.

        Returns:
            :obj:`~pyrogram.types.Message`: On success, the sent venue message is returned.

        Example:
            .. code-block:: python

                app.send_venue(
                    "me", latitude, longitude,
                    "Venue title", "Venue address")
        N)Zlatlongr   )Z	geo_pointr   r   providerZvenue_idZ
venue_type)	ZpeerZmediamessageZsilentZreply_to_msg_idZ	random_idr   Z
noforwardsr   c                 S   s   i | ]}|j |qS  id.0ir   r   d/opt/bot/vods_filmes/script/venv/lib/python3.8/site-packages/pyrogram/methods/messages/send_venue.py
<dictcomp>   s      z(SendVenue.send_venue.<locals>.<dictcomp>c                 S   s   i | ]}|j |qS r   r   r   r   r   r    r!      s      )Zis_scheduled)Zinvoker   Z	functionsmessagesZ	SendMediaZresolve_peerr   ZInputMediaVenueZInputGeoPointZrnd_idr   Zdatetime_to_timestampwriteZupdates
isinstanceZUpdateNewMessageZUpdateNewChannelMessageZUpdateNewScheduledMessageMessage_parser   ZusersZchats)r	   r
   r   r   r   r   r   r   r   r   r   r   r   rr   r   r   r    
send_venue   sF    L


 zSendVenue.send_venue)r   r   NNNNN)
__name__
__module____qualname__r   intstrfloatboolr   r(   r   r   r   r    r      s2          
r   )r   typingr   Zpyrogramr   r   r   r   r   r   r   r    <module>   s
   