§
    ®eîiÇ  ã                   ó�   — d Z ddlmZ ddlmZ ddlmZmZ ddlm	Z	 ddl
mZmZ ddlmZmZmZ  G d„ d	e	eeef         ¦  «        Zd
S )z2This module contains the PaidMediaPurchased class.é    )ÚUpdate)ÚDEFAULT_TRUE)ÚSCTÚDVType)ÚBaseHandler)Úparse_chat_idÚparse_username)ÚCCTÚRTÚHandlerCallbackc                   ó–   ‡ — e Zd ZdZdZddefdddeeee	f         de
e         dz  de
e         dz  d	ee         f
ˆ fd
„Zdedefd„Zˆ xZS )ÚPaidMediaPurchasedHandlerai  Handler class to handle Telegram
    :attr:`purchased paid media <telegram.Update.purchased_paid_media>`.

    .. versionadded:: 21.6

    Args:
        callback (:term:`coroutine function`): The callback function for this handler. Will be
            called when :meth:`check_update` has determined that an update should be processed by
            this handler. Callback signature::

                async def callback(update: Update, context: CallbackContext)
        user_id (:obj:`int` | Collection[:obj:`int`], optional): Filters requests to allow only
            those which are from the specified user ID(s).

        username (:obj:`str` | Collection[:obj:`str`], optional): Filters requests to allow only
            those which are from the specified username(s).

        block (:obj:`bool`, optional): Determines whether the return value of the callback should
            be awaited before processing the next handler in
            :meth:`telegram.ext.Application.process_update`. Defaults to :obj:`True`.

            .. seealso:: :wiki:`Concurrency`
    Attributes:
        callback (:term:`coroutine function`): The callback function for this handler.
        block (:obj:`bool`): Determines whether the return value of the callback should be
            awaited before processing the next handler in
            :meth:`telegram.ext.Application.process_update`.
    )Ú	_user_idsÚ
_usernamesNÚselfz"PaidMediaPurchasedHandler[CCT, RT]ÚcallbackÚuser_idÚusernameÚblockc                 óž   •— t          ¦   «                              ||¬¦  «         t          |¦  «        | _        t	          |¦  «        | _        d S )N)r   )ÚsuperÚ__init__r   r   r	   r   )r   r   r   r   r   Ú	__class__s        €út/home/div/.hermes/hermes-agent/venv/lib/python3.11/site-packages/telegram/ext/_handlers/paidmediapurchasedhandler.pyr   z"PaidMediaPurchasedHandler.__init__@   sD   ø€ õ 	‰Œ×Ò˜¨ÐÑ/Ô/Ð/å& wÑ/Ô/ˆŒÝ(¨Ñ2Ô2ˆŒˆˆó    ÚupdateÚreturnc                 óÂ   — t          |t          ¦  «        r|j        sdS | j        s	| j        sdS |j        j        j        | j        v rdS |j        j        j        | j        v S )zäDetermines whether an update should be passed to this handler's :attr:`callback`.

        Args:
            update (:class:`telegram.Update` | :obj:`object`): Incoming update.

        Returns:
            :obj:`bool`

        FT)Ú
isinstancer   Úpurchased_paid_mediar   r   Ú	from_userÚidr   )r   r   s     r   Úcheck_updatez&PaidMediaPurchasedHandler.check_updateL   sn   € õ ˜&¥&Ñ)Ô)ð 	°Ô1Lð 	Ø�5àŒ~ð 	 d¤oð 	Ø�4ØÔ&Ô0Ô3°t´~ÐEÐEØ�4ØÔ*Ô4Ô=ÀÄÐPÐPr   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   r   r   r
   r   r   ÚintÚstrr   Úboolr   Úobjectr#   Ú__classcell__)r   s   @r   r   r      s×   ø€ € € € € ðð ð:€Ið $(Ø$(Ø*ð
3ð 
3Ø2ð
3à! &¨#¨r /Ô2ð
3ð �S”˜D‘ð
3ð �c”(˜T‘/ð	
3ð
 �dŒ|ð
3ð 
3ð 
3ð 
3ð 
3ð 
3ðQ 6ð Q¨dð Qð Qð Qð Qð Qð Qð Qð Qr   r   N)r'   Útelegramr   Útelegram._utils.defaultvaluer   Útelegram._utils.typesr   r   Ú"telegram.ext._handlers.basehandlerr   Ú#telegram.ext._utils._update_parsingr   r	   Útelegram.ext._utils.typesr
   r   r   r   © r   r   ú<module>r5      sä   ðð& 9Ð 8à Ð Ð Ð Ð Ð Ø 5Ð 5Ð 5Ð 5Ð 5Ð 5Ø -Ð -Ð -Ð -Ð -Ð -Ð -Ð -Ø :Ð :Ð :Ð :Ð :Ð :Ø MÐ MÐ MÐ MÐ MÐ MÐ MÐ MØ >Ð >Ð >Ð >Ð >Ð >Ð >Ð >Ð >Ð >ð@Qð @Qð @Qð @Qð @Q ¨F°C¸¨OÔ <ñ @Qô @Qð @Qð @Qð @Qr   