§
    ­eîi•  ã                   ó®   — d Z ddlmZm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 ddlmZmZ  ed	¦  «        Z G d
„ deeeef         ¦  «        ZdS )z1This module contains the ChatMemberHandler class.é    )ÚFinalÚTypeVar)ÚUpdate)ÚDEFAULT_TRUE)ÚSCTÚDVType)ÚBaseHandler)Úparse_chat_id)ÚCCTÚHandlerCallbackÚRTc                   óÚ   ‡ — e Zd ZU dZdZdZee         ed<   	 dZ	ee         ed<   	 dZ
ee         ed<   	 eed	fd
ddeeeef         dedee         dee         d	z  f
ˆ fd„Zdedefd„Zˆ xZS )ÚChatMemberHandlera“  Handler class to handle Telegram updates that contain a chat member update.

    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.

    Examples:
        :any:`Chat Member Bot <examples.chatmemberbot>`

    .. versionadded:: 13.4

    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_member_types (:obj:`int`, optional): Pass one of :attr:`MY_CHAT_MEMBER`,
            :attr:`CHAT_MEMBER` or :attr:`ANY_CHAT_MEMBER` to specify if this handler should handle
            only updates with :attr:`telegram.Update.my_chat_member`,
            :attr:`telegram.Update.chat_member` or both. Defaults to :attr:`MY_CHAT_MEMBER`.
        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`
        chat_id (:obj:`int` | Collection[:obj:`int`], optional): Filters chat member updates from
            specified chat ID(s) only.
            .. versionadded:: 21.3

    Attributes:
        callback (:term:`coroutine function`): The callback function for this handler.
        chat_member_types (:obj:`int`): Optional. Specifies if this handler should handle
            only updates with :attr:`telegram.Update.my_chat_member`,
            :attr:`telegram.Update.chat_member` or both.
        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`.

    )Ú	_chat_idsÚchat_member_typeséÿÿÿÿÚMY_CHAT_MEMBERr   ÚCHAT_MEMBERé   ÚANY_CHAT_MEMBERNÚselfzChatMemberHandler[CCT, RT]Úcallbackr   ÚblockÚchat_idc                 ó„   •— t          ¦   «                              ||¬¦  «         || _        t          |¦  «        | _        d S )N)r   )ÚsuperÚ__init__r   r
   r   )r   r   r   r   r   Ú	__class__s        €úl/home/div/.hermes/hermes-agent/venv/lib/python3.11/site-packages/telegram/ext/_handlers/chatmemberhandler.pyr   zChatMemberHandler.__init__Z   s=   ø€ õ 	‰Œ×Ò˜¨ÐÑ/Ô/Ð/à->ˆÔÝ& wÑ/Ô/ˆŒˆˆó    ÚupdateÚreturnc                 ó*  — t          |t          ¦  «        sdS |j        s	|j        sdS | j        r|j        r|j        j        | j        vrdS | j        | j        k    rdS | j        | j	        k    rt          |j        ¦  «        S t          |j        ¦  «        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   Úmy_chat_memberÚchat_memberr   Úeffective_chatÚidr   r   r   Úbool)r   r!   s     r   Úcheck_updatezChatMemberHandler.check_updatef   s­   € õ ˜&¥&Ñ)Ô)ð 	Ø�5ØÔ%ð 	¨Ô);ð 	Ø�5àŒNð	àÔ%ð	ð Ô%Ô(°´Ð>Ð>à�5ØÔ! TÔ%9Ò9Ð9Ø�4ØÔ! TÔ%5Ò5Ð5Ý˜Ô*Ñ+Ô+Ð+Ý�FÔ)Ñ*Ô*Ð*r    )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   r   ÚintÚ__annotations__r   r   r   r   r   r   r   r   r)   r   r   Úobjectr*   Ú__classcell__)r   s   @r   r   r   !   s  ø€ € € € € € ð*ð *ðX€Ið "$€N�E˜#”JÐ#Ð#Ñ#Ø_Ø€K��s”ÐÐÑØ\Ø"#€O�U˜3”ZÐ#Ð#Ñ#ð0ð "0Ø*Ø#'ð
0ð 
0Ø*ð
0à! &¨#¨r /Ô2ð
0ð ð
0ð �dŒ|ð	
0ð
 �S”˜D‘ð
0ð 
0ð 
0ð 
0ð 
0ð 
0ð+ 6ð +¨dð +ð +ð +ð +ð +ð +ð +ð +r    r   N)r.   Útypingr   r   Útelegramr   Útelegram._utils.defaultvaluer   Útelegram._utils.typesr   r   Ú"telegram.ext._handlers.basehandlerr	   Ú#telegram.ext._utils._update_parsingr
   Útelegram.ext._utils.typesr   r   r   r   © r    r   ú<module>r<      só   ðð& 8Ð 7à !Ð !Ð !Ð !Ð !Ð !Ð !Ð !à Ð Ð Ð Ð Ð Ø 5Ð 5Ð 5Ð 5Ð 5Ð 5Ø -Ð -Ð -Ð -Ð -Ð -Ð -Ð -Ø :Ð :Ð :Ð :Ð :Ð :Ø =Ð =Ð =Ð =Ð =Ð =Ø :Ð :Ð :Ð :Ð :Ð :Ð :Ð :à€WˆT�]„]€ð]+ð ]+ð ]+ð ]+ð ]+˜ F¨C° OÔ4ñ ]+ô ]+ð ]+ð ]+ð ]+r    