o
    -˜Žjí  ã                   @   s2   d dl Z d dlmZ d dlmZ G dd„ dƒZdS )é    N)ÚDisconnectHandler)ÚHandlerc                   @   s&   e Zd Z	d
dddddefdd„Zd	S )ÚRemoveHandlerr   Úselfzpyrogram.ClientÚhandlerr   Úgroupc                 C   s&   t |tƒr
d| _dS | j ||¡ dS )aÁ  Remove a previously-registered update handler.

        Make sure to provide the right group where the handler was added in. You can use the return value of the
        :meth:`~pyrogram.Client.add_handler` method, a tuple of *(handler, group)*, and pass it directly.

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

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

        Example:
            .. code-block:: python

                from pyrogram import Client
                from pyrogram.handlers import MessageHandler

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

                app = Client("my_account")

                handler = app.add_handler(MessageHandler(hello))

                # Starred expression to unpack (handler, group)
                app.remove_handler(*handler)

                app.run()
        N)Ú
isinstancer   Údisconnect_handlerÚ
dispatcherÚremove_handler)r   r   r   © r   úf/var/www/kodo/Anonymous/send/lib/python3.10/site-packages/pyrogram/methods/utilities/remove_handler.pyr      s   
#
zRemoveHandler.remove_handlerN)r   )Ú__name__Ú
__module__Ú__qualname__Úintr   r   r   r   r   r      s    ýÿþýr   )ÚpyrogramÚpyrogram.handlersr   Úpyrogram.handlers.handlerr   r   r   r   r   r   Ú<module>   s   