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dddddZdS )	EditMessageReplyMarkupNzpyrogram.Clientztypes.InlineKeyboardMarkupztypes.Message)selfchat_id
message_idreply_markupreturnc                    s   |  tjjj| |I dH ||r0|| I dH nddI dH }|jD ]P}t|tj	j
tj	jfrFt	j| |jdd |jD dd |jD I dH   S qFdS )a  Edit only the reply markup of messages sent by the bot.

        .. include:: /_includes/usable-by/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).

            message_id (``int``):
                Message identifier in the chat specified in chat_id.

            reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
                An InlineKeyboardMarkup object.

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

        Example:
            .. code-block:: python

                from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton

                # Bots only
                await app.edit_message_reply_markup(
                    chat_id, message_id,
                    InlineKeyboardMarkup([[
                        InlineKeyboardButton("New button", callback_data="new_data")]]))
        N)Zpeeridr	   c                 S   s   i | ]}|j |qS  r   .0ir   r   s/opt/bot/vods_filmes/script/venv/lib/python3.8/site-packages/pyrogram/methods/messages/edit_message_reply_markup.py
<dictcomp>K   s      zDEditMessageReplyMarkup.edit_message_reply_markup.<locals>.<dictcomp>c                 S   s   i | ]}|j |qS r   r   r   r   r   r   r   L   s      )Zinvoker   Z	functionsmessagesZEditMessageZresolve_peerwriteZupdates
isinstancer   ZUpdateEditMessageZUpdateEditChannelMessageMessage_parsemessageZusersZchats)r   r   r   r	   rr   r   r   r   edit_message_reply_markup   s    $

 z0EditMessageReplyMarkup.edit_message_reply_markup)N)__name__
__module____qualname__r   intstrr   r   r   r   r   r      s    
r   )typingr   Zpyrogramr   r   r   r   r   r   r   <module>   s   