U
    ;g                     @   s6   d dl mZ d dlZd dlmZmZ G dd dZdS )    )UnionN)rawenumsc                   @   s(   e Zd Zdeeef dedddZdS )SendChatActionzpyrogram.Clientzenums.ChatAction)selfchat_idactionreturnc                    sZ   |j  }d|ksd|kr(|jdd}n| }| tjjj| |I dH |dI dH S )a>  Tell the other party that something is happening on your side.

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

        Parameters:
            chat_id (``int`` | ``str``):
                Unique identifier (int) or username (str) of the target chat.
                For your personal cloud (Saved Messages) you can simply use "me" or "self".
                For a contact that exists in your Telegram address book you can use his phone number (str).

            action (:obj:`~pyrogram.enums.ChatAction`):
                Type of action to broadcast.

        Returns:
            ``bool``: On success, True is returned.

        Raises:
            ValueError: In case the provided string is not a valid chat action.

        Example:
            .. code-block:: python

                from pyrogram import enums

                # Send "typing" chat action
                await app.send_chat_action(chat_id, enums.ChatAction.TYPING)

                # Send "upload_video" chat action
                await app.send_chat_action(chat_id, enums.ChatAction.UPLOAD_VIDEO)

                # Send "playing" chat action
                await app.send_chat_action(chat_id, enums.ChatAction.PLAYING)

                # Cancel any current chat action
                await app.send_chat_action(chat_id, enums.ChatAction.CANCEL)
        uploadhistoryr   )progressN)Zpeerr   )	namelowervalueZinvoker   Z	functionsmessagesZ	SetTypingZresolve_peer)r   r   r   action_name r   j/opt/bot/vods_filmes/script/venv/lib/python3.8/site-packages/pyrogram/methods/messages/send_chat_action.pysend_chat_action   s    *
zSendChatAction.send_chat_actionN)__name__
__module____qualname__r   intstrboolr   r   r   r   r   r      s
   
r   )typingr   Zpyrogramr   r   r   r   r   r   r   <module>   s   