Ë
    :É„ju	  ã                   ó8   — d dl Z d dlmZ d dlmZ  G d„ d«      Zy)é    N)ÚDisconnectHandler)ÚHandlerc                   ó$   — e Zd Z	 ddddddefd„Zy)	Ú
AddHandlerÚselfzpyrogram.ClientÚhandlerr   Úgroupc                 óŒ   — t        |t        «      r|j                  | _        ||fS | j                  j                  ||«       ||fS )a'  Register an update handler.

        You can register multiple handlers, but at most one handler within a group will be used for a single update.
        To handle the same update more than once, register your handler using a different group id (lower group id
        == higher priority). This mechanism is explained in greater details at
        :doc:`More on Updates <../../topics/more-on-updates>`.

        Parameters:
            handler (``Handler``):
                The handler to be registered.

            group (``int``, *optional*):
                The group identifier, defaults to 0.

        Returns:
            ``tuple``: A tuple consisting of *(handler, group)*.

        Example:
            .. code-block:: python

                from pyrogram import Client
                from pyrogram.handlers import MessageHandler

                async def hello(client, message):
                    print(message)

                app = Client("my_account")

                app.add_handler(MessageHandler(hello))

                app.run()
        )Ú
isinstancer   ÚcallbackÚdisconnect_handlerÚ
dispatcherÚadd_handler)r   r   r	   s      ú]/var/www/html/GAP/venv/lib/python3.12/site-packages/pyrogram/methods/utilities/add_handler.pyr   zAddHandler.add_handler   sJ   € ôJ �gÔ0Ô1Ø&-×&6Ñ&6ˆDÔ#ð ˜ˆ~Ðð �O‰O×'Ñ'¨°Ô7à˜ˆ~Ðó    N)r   )Ú__name__Ú
__module__Ú__qualname__Úintr   © r   r   r   r      s&   „ ð ñ*Øð*àð*ð ô*r   r   )ÚpyrogramÚpyrogram.handlersr   Úpyrogram.handlers.handlerr   r   r   r   r   ú<module>r      s   ðó( Ý /Ý -÷+ò +r   