
    N[i	                     H    d dl mZmZ d dlZd dlmZ d dlmZ  G d d      Zy)    )UnionListN)raw)typesc                   B    e Zd Zdddeeef   dedeeee   f   ddf
dZy	)
VotePollselfzpyrogram.Clientchat_id
message_idoptionsreturnz
types.Pollc                   K   | j                  ||       d{   j                  }t        |t              s|gn|}| j	                  t
        j                  j                  j                  | j                  |       d{   ||D cg c]  }|j                  |   j                   c}             d{   }t        j                  j                  | |j                  d         S 7 7 kc c}w 7 :w)a  Vote a poll.

        .. include:: /_includes/usable-by/users.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.

            options (``Int`` | List of ``int``):
                Index or list of indexes (for multiple answers) of the poll option(s) you want to vote for (0 to 9).

        Returns:
            :obj:`~pyrogram.types.Poll` - On success, the poll with the chosen option is returned.

        Example:
            .. code-block:: python

                await app.vote_poll(chat_id, message_id, 6)
        N)peermsg_idr   r   )get_messagespoll
isinstancelistinvoker   	functionsmessagesSendVoteresolve_peerr   datar   Poll_parseupdates)r	   r
   r   r   r   optionrs          V/var/www/files/kim/lib/python3.12/site-packages/pyrogram/methods/messages/vote_poll.py	vote_pollzVotePoll.vote_poll   s     > ''<<BB#-gt#<7)'++MM""++,,W55!AHIvf-22I , 
 
 zz  qyy|44 =
 6I	
s@   C3C(A%C3>C*?C3 C,'C36C172C3*C3,C3N)	__name__
__module____qualname__r   intstridr   r!        r    r   r      sJ    *5*5sCx*5 *5 sDI~&	*5
 
*5r)   r   )typingr   r   pyrogramr   r   r   r(   r)   r    <module>r,      s   &    +5 +5r)   