Ë
    :É„jF  ã                   ó„   — 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 d dlmZ  e j                  e
«      Z G d„ d«      Zy)é    N)ÚUnionÚListÚIterable)Úraw)Útypes)Úutilsc                   ón   — e Zd Z	 	 	 ddddeeef   deeee   f   deeee   f   deded	ed	   f   fd
„Zy)ÚGetMessagesNÚselfzpyrogram.ClientÚchat_idÚmessage_idsÚreply_to_message_idsÚrepliesÚreturnztypes.Messagec              ƒ   óð  K  — |r|t         j                  j                  fn|r|t         j                  j                  fnd\  }}|€t	        d«      ‚| j                  |«      ƒ d{  –—† }t        |t        «       }|rt        |«      n|g}|D �	cg c]  }	 ||	¬«      ‘Œ }}	|dk  rd}t        |t         j                  j                  «      r,t         j                  j                  j                  ||¬«      }
n*t         j                  j                  j                  |¬«      }
| j                  |
d¬	«      ƒ d{  –—† }t        j                   | ||¬
«      ƒ d{  –—† }|r|S |r|d   S dS 7 �Œc c}	w 7 Œ97 Œ­w)aM	  Get one or more messages from a chat by using message identifiers.

        You can retrieve up to 200 messages at once.

        .. 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).
                You can also use chat public link in form of *t.me/<username>* (str).

            message_ids (``int`` | Iterable of ``int``, *optional*):
                Pass a single message identifier or an iterable of message ids (as integers) to get the content of the
                message themselves.

            reply_to_message_ids (``int`` | Iterable of ``int``, *optional*):
                Pass a single message identifier or an iterable of message ids (as integers) to get the content of
                the previous message you replied to using this message.
                If *message_ids* is set, this argument will be ignored.

            replies (``int``, *optional*):
                The number of subsequent replies to get for each message.
                Pass 0 for no reply at all or -1 for unlimited replies.
                Defaults to 1.

        Returns:
            :obj:`~pyrogram.types.Message` | List of :obj:`~pyrogram.types.Message`: In case *message_ids* was not
            a list, a single message is returned, otherwise a list of messages is returned.

        Example:
            .. code-block:: python

                # Get one message
                await app.get_messages(chat_id, 12345)

                # Get more than one message (list of messages)
                await app.get_messages(chat_id, [12345, 12346])

                # Get message by ignoring any replied-to message
                await app.get_messages(chat_id, message_id, replies=0)

                # Get message with all chained replied-to messages
                await app.get_messages(chat_id, message_id, replies=-1)

                # Get the replied-to message of a message
                await app.get_messages(chat_id, reply_to_message_ids=message_id)

        Raises:
            ValueError: In case of invalid arguments.
        )NNNzENo argument supplied. Either pass message_ids or reply_to_message_ids)Úidr   iÿÿÿ)Úchannelr   éÿÿÿÿ)Úsleep_threshold)r   )r   r   ÚInputMessageIDÚInputMessageReplyToÚ
ValueErrorÚresolve_peerÚ
isinstanceÚintÚlistÚInputPeerChannelÚ	functionsÚchannelsr
   ÚmessagesÚinvoker   Úparse_messages)r   r   r   r   r   ÚidsÚids_typeÚpeerÚis_iterableÚiÚrpcÚrr    s                ú]/var/www/html/GAP/venv/lib/python3.12/site-packages/pyrogram/methods/messages/get_messages.pyÚget_messageszGetMessages.get_messages#   sM  è ø€ ñx 8Cˆ[œ#Ÿ)™)×2Ñ2Ñ3ÙJ^Ð&¬¯	©	×(EÑ(EÑFØñ 	ˆˆXð ˆ;ÜÐdÓeÐeà×&Ñ& wÓ/×/ˆä$ S¬#Ó.Ð.ˆÙ&Œd�3Œi¨S¨EˆØ'*Ö+ !‰x˜1Ž~Ð+ˆÐ+à�QŠ;Ø#ˆGä�dœCŸI™I×6Ñ6Ô7Ü—-‘-×(Ñ(×4Ñ4¸TÀcÐ4ÓJ‰Cä—-‘-×(Ñ(×4Ñ4¸Ð4Ó<ˆCà—+‘+˜c°2�+Ó6×6ˆä×-Ñ-¨d°A¸wÔG×Gˆá&ˆxÐM¹8¨H°Q©KÐMÈÐMð% 0ûò ,ð 7øàGúsC   ‚A#E6Á%E*Á&)E6ÂE-ÂBE6Ä8E2Ä9E6ÅE4ÅE6Å-E6Å4E6)NNé   )	Ú__name__Ú
__module__Ú__qualname__r   r   Ústrr   r   r+   © ó    r*   r
   r
   "   s‹   „ ð 26Ø:>ØñVNØðVNà�s˜C�x‘ðVNð ˜3 ¨¡Ð-Ñ.ðVNð $ C¨°#©Ð$6Ñ7ð	VNð
 ðVNð 
ˆ  _Ñ 5Ð5Ñ	6ôVNr2   r
   )ÚloggingÚtypingr   r   r   Úpyrogramr   r   r   Ú	getLoggerr-   Úlogr
   r1   r2   r*   ú<module>r8      s<   ðó( ß (Ñ (ã Ý Ý Ý à€g×Ñ˜Ó!€÷WNò WNr2   