
    N[i                     D    d dl mZ d dlZd dlmZ d dlmZ  G d d      Zy)    )UnionN)raw)typesc                   6    e Zd Z	 ddddeeef   dedddd	f
d
Zy)EditMessageReplyMarkupNselfzpyrogram.Clientchat_id
message_idreply_markupztypes.InlineKeyboardMarkupreturnztypes.Messagec                   K   | j                  t        j                  j                  j	                  | j                  |       d{   ||r|j                  |        d{   nd             d{   }|j                  D ]  }t        |t        j                  j                  t        j                  j                  f      sBt        j                  j                  | |j                  |j                  D ci c]  }|j                   | c}|j"                  D ci c]  }|j                   | c}       d{   c S  y7 7 7 c c}w c c}w 7 w)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)peeridr   )invoker   	functionsmessagesEditMessageresolve_peerwriteupdates
isinstancer   UpdateEditMessageUpdateEditChannelMessageMessage_parsemessageusersr   chats)r   r	   r
   r   ris         f/var/www/files/kim/lib/python3.12/site-packages/pyrogram/methods/messages/edit_message_reply_markup.pyedit_message_reply_markupz0EditMessageReplyMarkup.edit_message_reply_markup   s    H ++MM""..,,W55?K<#5#5d#;;;QU / 
 
  	A!cii99399;];]^_"]]11!))&'gg.QTT1W.&'gg.QTT1W.  	 6;	
 /.sg   AEEE E!E3E4AE3E9E
EE1
E;E<	EEE
E)N)__name__
__module____qualname__r   intstrr"        r!   r   r      sB    
 6:	22sCx2 2 3	2
 
2r)   r   )typingr   pyrogramr   r   r   r(   r)   r!   <module>r,      s   &    3 3r)   