§
    ®eîiW  ã                   ó¾   — d Z ddlmZmZmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ ddlmZ ddlmZmZ erdd	lmZ  ed
¦  «        Z G d„ deeeef         ¦  «        ZdS )z.This module contains the MessageHandler class.é    )ÚTYPE_CHECKINGÚAnyÚTypeVar)ÚUpdate)ÚDEFAULT_TRUE)ÚDVType©Úfilters)ÚBaseHandler)ÚCCTÚHandlerCallback)ÚApplicationÚRTc                   óÚ   ‡ — e Zd ZdZdZefdddej        dz  dee	e
ef         dee         fˆ fd	„Zd
edeeeee         f         z  dz  fd„Zde
d
e	dddeeeef         z  dz  ddf
d„Zˆ xZS )ÚMessageHandleraþ  Handler class to handle Telegram messages. They might contain text, media or status
    updates.

    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.

    Args:
        filters (:class:`telegram.ext.filters.BaseFilter`): A filter inheriting from
            :class:`telegram.ext.filters.BaseFilter`. Standard filters can be found in
            :mod:`telegram.ext.filters`. Filters can be combined using bitwise
            operators (& for and, | for or, ~ for not). Passing :obj:`None` is a shortcut
            to passing :class:`telegram.ext.filters.ALL`.

            .. seealso:: :wiki:`Advanced Filters <Extensions---Advanced-Filters>`
        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`.
        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:
        filters (:class:`telegram.ext.filters.BaseFilter`): Only allow updates with these Filters.
            See :mod:`telegram.ext.filters` for a full list of all available filters.
        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`.

    r	   ÚselfzMessageHandler[CCT, RT]r
   NÚcallbackÚblockc                 óx   •— t          ¦   «                              ||¬¦  «         |�|nt          j        | _        d S )N)r   )ÚsuperÚ__init__Úfilters_moduleÚALLr
   )r   r
   r   r   Ú	__class__s       €úi/home/div/.hermes/hermes-agent/venv/lib/python3.11/site-packages/telegram/ext/_handlers/messagehandler.pyr   zMessageHandler.__init__N   s<   ø€ õ 	‰Œ×Ò˜¨ÐÑ/Ô/Ð/àÐ*ˆGˆGµÔ0Bð 	Œˆˆó    ÚupdateÚreturnc                 óh   — t          |t          ¦  «        r| j                             |¦  «        pdS d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`

        FN)Ú
isinstancer   r
   Úcheck_update)r   r   s     r   r!   zMessageHandler.check_updateY   s6   € õ �f�fÑ%Ô%ð 	>Ø”<×,Ò,¨VÑ4Ô4Ð=¸Ð=Øˆtr   ÚcontextÚapplicationz)Application[Any, CCT, Any, Any, Any, Any]Úcheck_resultc                 ó^   — t          |t          ¦  «        r|                     |¦  «         dS dS )zEAdds possible output of data filters to the :class:`CallbackContext`.N)r    Údictr   )r   r"   r   r#   r$   s        r   Úcollect_additional_contextz)MessageHandler.collect_additional_contextg   s8   € õ �l¥DÑ)Ô)ð 	)Ø�NŠN˜<Ñ(Ô(Ð(Ð(Ð(ð	)ð 	)r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   r   Ú
BaseFilterr   r   r   r   r   Úboolr   Úobjectr&   ÚstrÚlistr   r!   r'   Ú__classcell__)r   s   @r   r   r   $   s%  ø€ € € € € ð%ð %ðN €Ið +ð		
ð 	
Ø'ð	
àÔ*¨TÑ1ð	
ð " &¨#¨r /Ô2ð	
ð �dŒ|ð		
ð 	
ð 	
ð 	
ð 	
ð 	
ð 6ð ¨d°T¸#¸tÀC¼y¸.Ô5IÑ.IÈDÑ.Pð ð ð ð ð	)àð	)ð ð	)ð Að		)ð
 ˜T # v +Ô.Ñ.°Ñ5ð	)ð 
ð	)ð 	)ð 	)ð 	)ð 	)ð 	)ð 	)ð 	)r   r   N)r+   Útypingr   r   r   Útelegramr   Útelegram._utils.defaultvaluer   Útelegram._utils.typesr   Útelegram.extr
   r   Ú"telegram.ext._handlers.basehandlerr   Útelegram.ext._utils.typesr   r   r   r   r   © r   r   ú<module>r;      s  ðð& 5Ð 4à .Ð .Ð .Ð .Ð .Ð .Ð .Ð .Ð .Ð .à Ð Ð Ð Ð Ð Ø 5Ð 5Ð 5Ð 5Ð 5Ð 5Ø (Ð (Ð (Ð (Ð (Ð (Ø 2Ð 2Ð 2Ð 2Ð 2Ð 2Ø :Ð :Ð :Ð :Ð :Ð :Ø :Ð :Ð :Ð :Ð :Ð :Ð :Ð :àð )Ø(Ð(Ð(Ð(Ð(Ð(à€WˆT�]„]€ðL)ð L)ð L)ð L)ð L)�[ ¨¨b Ô1ñ L)ô L)ð L)ð L)ð L)r   