+
    ÁFñj–  ã                   ó|   € R t ^ RIHt ^ RIHt ^ RIHt ^ RIHtH	t	 ^ RI
HtHtHt  ! R R]]]]3,          4      tR# )	z0This module contains the ChatBoostHandler class.)ÚFinal)ÚUpdate)ÚBaseHandler)Úparse_chat_idÚparse_username)ÚCCTÚRTÚHandlerCallbackc                   ó‚   a a€ ] tR t^t oRtR	tR
t ^ t ^t ]RRR3V3R lV 3R lllt	V3R lR lt
V3R ltR	tVtV ;t# )ÚChatBoostHandleraú  
Handler class to handle Telegram updates that contain a chat boost.

Warning:
    When setting :paramref:`block` to :obj:`False`, you cannot rely on adding custom
    attributes to :class:`telegram.ext.CallbackContext`. See its docs for more info.

.. versionadded:: 20.8

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)

        The return value of the callback is usually ignored except for the special case of
        :class:`telegram.ext.ConversationHandler`.
    chat_boost_types (:obj:`int`, optional): Pass one of
        :attr:`CHAT_BOOST`, :attr:`REMOVED_CHAT_BOOST` or
        :attr:`ANY_CHAT_BOOST` to specify if this handler should handle only updates with
        :attr:`telegram.Update.chat_boost`,
        :attr:`telegram.Update.removed_chat_boost` or both. Defaults to
        :attr:`CHAT_BOOST`.
    chat_id (:obj:`int` | Collection[:obj:`int`], optional): Filters reactions to allow
        only those which happen in the specified chat ID(s).
    chat_username (:obj:`str` | Collection[:obj:`str`], optional): Filters reactions to allow
        only those which happen in 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.
    chat_boost_types (:obj:`int`): Optional. Specifies if this handler should handle only
        updates with :attr:`telegram.Update.chat_boost`,
        :attr:`telegram.Update.removed_chat_boost` or both.
    block (:obj:`bool`): Determines whether the callback will run in a blocking way.
NTc                ór   <€ V ^8„  d   QhRRRS[ S[S[S[3,          RS[RS[R,          RS[R,          RS[/# )	é   ÚselfzChatBoostHandler[CCT, RT]ÚcallbackÚchat_boost_typesÚchat_idNÚchat_usernameÚblock)r	   r   r   r   ÚintÚstrÚbool)ÚformatÚ__classdict__s   "€Ú]/opt/hermes-site/venv/lib/python3.14/site-packages/telegram/ext/_handlers/chatboosthandler.pyÚ__annotate__ÚChatBoostHandler.__annotate__V   sX   ø€ ÷ =ñ =Ø)ð=á!¡&©#©r /Õ2ð=ñ ð=ñ �t•ð	=ñ
 ˜T•zð=ñ ñ=ó    c                ót   <€ \         SV `  WR 7       W n        \        V4      V n        \        V4      V n        R# ))r   N)ÚsuperÚ__init__r   r   Ú	_chat_idsr   Ú_chat_usernames)r   r   r   r   r   r   Ú	__class__s   &&&&&&€r   r   ÚChatBoostHandler.__init__V   s4   ø€ ô 	‰Ñ˜ÐÔ/Ø%5ÔÜ& wÓ/ˆŒÜ-¨mÓ<ˆÖr   c                ó&   <€ V ^8„  d   QhRS[ RS[/# )r   ÚupdateÚreturn)Úobjectr   )r   r   s   "€r   r   r   c   s   ø€ ÷ 
ñ 
¡6ð 
©dñ 
r   c                ó¸  € \        V\        4      '       g   R# VP                  '       g   VP                  '       g   R# V P                  V P
                  8X  d   VP                  '       g   R# V P                  V P                  8X  d   VP                  '       g   R# \        V P                  V P                  34      '       g   R# VP                  ;p'       d   VP                  MRpV'       d   VP                  MRp\        V P                  ;'       d    W0P                  9   4      ;'       g,    \        V P                  ;'       d    W@P                  9   4      # )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`

FTN)Ú
isinstancer   Ú
chat_boostÚremoved_chat_boostr   Ú
CHAT_BOOSTÚREMOVED_CHAT_BOOSTÚanyr    r!   Úeffective_chatÚidÚusernamer   )r   r%   Úchatr   r   s   &&   r   Úcheck_updateÚChatBoostHandler.check_updatec   s  € ô ˜&¤&×)Ò)Ùà×!×!Ð! V×%>×%>Ð%>Ùà× Ñ  D§O¡OÔ3¸F×<M×<MÐ<MÙà× Ñ  D×$;Ñ$;Ô;ÀF×D]×D]ÐD]Ùä�D—N‘N D×$8Ñ$8Ð9×:Ò:Ùð '-×&;Ñ&;Ð;˜dÖ;�$—'’'À$ˆß)-˜Ÿš°4ˆä�D—N‘N×BÐB¨·>±>Ñ(AÓC÷ 
ð 
ÄtØ× Ñ ×LÐL m×7KÑ7KÑ&KóH
ð 	
r   c                ón   <€ V ^8„  d   Qh/ S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   # )r   r,   r-   ÚANY_CHAT_BOOST)r   r   )r   r   s   "€r   r   r      s>   ø‡ ‚ ñb ‘c•
Ññc ñf ™c�
Ñ&ñg ñj ™#•JÑ"òk r   )r    r!   r   éÿÿÿÿ)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú	__slots__r,   r-   r6   r   r3   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__Ú__classcell__)r"   r   s   @@r   r   r      sY   ù‡ € ñ(ðT€Ið  €JØ\Ø%&ÐØcØ!"€Nð7ð !+Ø"Ø$(Ø÷=õ =÷
ð 
÷M … r   r   N)r<   Útypingr   Útelegramr   Ú"telegram.ext._handlers.basehandlerr   Ú#telegram.ext._utils._update_parsingr   r   Útelegram.ext._utils.typesr   r   r	   r   © r   r   Ú<module>rH      s5   ðñ& 7å å Ý :ß Mß >Ñ >ôe
�{ 6¨3° ?Õ3ö e
r   