U
    ;g                     @   s>   d dl mZ d dlZd dlmZ d dlmZ G dd dZdS )    )UnionN)raw)typesc                   @   s,   e Zd Zddeeef edddddZdS )	StopPollNzpyrogram.Clientztypes.InlineKeyboardMarkupz
types.Poll)selfchat_id
message_idreply_markupreturnc                    s   |  ||I dH j}| tjjj| |I dH |tjj	tjj
t|jddg dd|rf|| I dH nddI dH }tj
| |jd S )a  Stop a poll which was sent by you.

        Stopped polls can't be reopened and nobody will be able to vote in it anymore.

        .. 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).

            message_id (``int``):
                Identifier of the original message with the poll.

            reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
                An InlineKeyboardMarkup object.

        Returns:
            :obj:`~pyrogram.types.Poll`: On success, the stopped poll with the final results is returned.

        Example:
            .. code-block:: python

                await app.stop_poll(chat_id, message_id)
        NT )idclosedquestionZanswers)poll)Zpeerr   Zmediar	   r   )Zget_messagesr   Zinvoker   Z	functionsmessagesZEditMessageZresolve_peerr   ZInputMediaPollZPollintr   write_parseZupdates)r   r   r   r	   r   r r   c/opt/bot/vods_filmes/script/venv/lib/python3.8/site-packages/pyrogram/methods/messages/stop_poll.py	stop_poll   s"     
zStopPoll.stop_poll)N)__name__
__module____qualname__r   r   strr   r   r   r   r   r      s    
r   )typingr   Zpyrogramr   r   r   r   r   r   r   <module>   s   