U
    ;g-
                     @   s2   d dl mZ d dlZd dlmZ G dd dZdS )    )UnionN)rawc                   @   s(   e Zd Zddeeef edddZdS )	LeaveChatFzpyrogram.Client)selfchat_iddeletec                    s   |  |I dH }t|tjjrF| tjjj|  |I dH dI dH S t|tjj	r| tjj
j|jtj dI dH }|r| tjj
j|ddI dH  |S dS )a  Leave a group chat or channel.

        .. include:: /_includes/usable-by/users-bots.rst

        Parameters:
            chat_id (``int`` | ``str``):
                Unique identifier for the target chat or username of the target channel/supergroup
                (in the format @username).

            delete (``bool``, *optional*):
                Deletes the group chat dialog after leaving (for simple group chats, not supergroups).
                Defaults to False.

        Example:
            .. code-block:: python

                # Leave chat or channel
                await app.leave_chat(chat_id)

                # Leave basic chat and also delete the dialog
                await app.leave_chat(chat_id, delete=True)
        N)Zchannel)r   Zuser_idr   )peerZmax_id)Zresolve_peer
isinstancer   typesZInputPeerChannelZinvokeZ	functionsZchannelsZLeaveChannelZInputPeerChatmessagesZDeleteChatUserr   ZInputUserSelfZDeleteHistory)r   r   r   r   r r   a/opt/bot/vods_filmes/script/venv/lib/python3.8/site-packages/pyrogram/methods/chats/leave_chat.py
leave_chat   s,    


zLeaveChat.leave_chatN)F)__name__
__module____qualname__r   intstrboolr   r   r   r   r   r      s    
r   )typingr   Zpyrogramr   r   r   r   r   r   <module>   s   