
    Yi                         S r SSKJr  SSKJr  SSKJr  SSKJrJ	r	  SSK
Jr  SSKJrJr  SSKJrJrJr   " S	 S
\\\\4   5      rg)z2This module contains the PaidMediaPurchased class.    )Optional)Update)DEFAULT_TRUE)SCTDVType)BaseHandler)parse_chat_idparse_username)CCTRTHandlerCallbackc                      ^  \ rS rSrSrSrSS\4SSS\\\	\
4   S\\\      S	\\\      S
\\   4
U 4S jjjrS\S\4S jrSrU =r$ )PaidMediaPurchasedHandler   a  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U ]  XS9  [        U5      U l        [	        U5      U l        g )N)r   )super__init__r	   r   r
   r   )r   r   r   r   r   	__class__s        [/app/.venv/lib/python3.13/site-packages/telegram/ext/_handlers/paidmediapurchasedhandler.pyr   "PaidMediaPurchasedHandler.__init__B   s-     	/&w/(2    updatereturnc                 N   [        U[        5      (       a  UR                  (       d  gU R                  (       d  U R                  (       d  gUR                  R
                  R                  U R                  ;   a  gUR                  R
                  R                  U R                  ;   $ )zDetermines 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_update&PaidMediaPurchasedHandler.check_updateN   sn     &&))1L1L~~doo&&0033t~~E**44==PPr   )__name__
__module____qualname____firstlineno____doc__	__slots__r   r   r   r   r   r   r   intstrr   boolr   objectr&   __static_attributes____classcell__)r   s   @r   r   r      s    :I '+'+*
32
3!&#r/2
3 #c(#
3 3s8$	
3
 d|
3 
3Q6 Qd Q Qr   r   N)r,   typingr   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>r<      s=   & 9   5 - : M > >@QFCO < @Qr   