File tree Expand file tree Collapse file tree
pyrogram/client/methods/messages Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323
2424
2525class VotePoll (BaseClient ):
26- # TODO: Docs
2726 def vote_poll (self ,
2827 chat_id : Union [int , str ],
2928 message_id : id ,
3029 option : int ) -> bool :
30+ """Use this method to vote a poll.
31+
32+ Args:
33+ chat_id (``int`` | ``str``):
34+ Unique identifier (int) or username (str) of the target chat.
35+ For your personal cloud (Saved Messages) you can simply use "me" or "self".
36+ For a contact that exists in your Telegram address book you can use his phone number (str).
37+
38+ message_id (``int``):
39+ Unique poll message identifier inside this chat.
40+
41+ option (``int``):
42+ Index of the poll option you want to vote for (0 to 9).
43+
44+ Returns:
45+ On success, True is returned.
46+
47+ Raises:
48+ :class:`Error <pyrogram.Error>` in case of a Telegram RPC error.
49+ """
3150 poll = self .get_messages (chat_id , message_id ).poll
3251
3352 self .send (
You can’t perform that action at this time.
0 commit comments