Skip to content

Commit 098b06d

Browse files
committed
Fix poll docstrings and vote_poll wrong attribute access
1 parent 46d2066 commit 098b06d

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

pyrogram/client/methods/messages/vote_poll.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def vote_poll(self,
5353
functions.messages.SendVote(
5454
peer=self.resolve_peer(chat_id),
5555
msg_id=message_id,
56-
options=[poll.options[option]._data]
56+
options=[poll.options[option].data]
5757
)
5858
)
5959

pyrogram/client/types/messages_and_media/poll_option.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,25 @@
2121

2222

2323
class PollOption(PyrogramType):
24+
"""This object represents a Poll Option.
25+
26+
Args:
27+
text (``str``):
28+
Text of the poll option.
29+
30+
voters (``int``):
31+
The number of users who voted this option.
32+
33+
data (``bytes``):
34+
Unique data that identifies this option among all the other options in a poll.
35+
"""
36+
2437
def __init__(self,
2538
*,
2639
client: "pyrogram.client.ext.BaseClient",
2740
text: str,
2841
voters: int,
2942
data: bytes):
30-
"""This object represents a Poll Option.
31-
32-
Args:
33-
text (``str``):
34-
Text of the poll option.
35-
36-
voters (``int``):
37-
The number of users who voted this option.
38-
39-
data (``bytes``):
40-
Unique data that identifies this option (among all the other options in a poll).
41-
"""
4243
super().__init__(client)
4344

4445
self.text = text

0 commit comments

Comments
 (0)