2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-29 13:27:47 +00:00

Fix poll docstrings and vote_poll wrong attribute access

This commit is contained in:
Dan 2018-12-24 14:32:53 +01:00
parent 46d206610e
commit 098b06d1b7
2 changed files with 14 additions and 13 deletions

View File

@ -53,7 +53,7 @@ class VotePoll(BaseClient):
functions.messages.SendVote(
peer=self.resolve_peer(chat_id),
msg_id=message_id,
options=[poll.options[option]._data]
options=[poll.options[option].data]
)
)

View File

@ -21,12 +21,6 @@ from ..pyrogram_type import PyrogramType
class PollOption(PyrogramType):
def __init__(self,
*,
client: "pyrogram.client.ext.BaseClient",
text: str,
voters: int,
data: bytes):
"""This object represents a Poll Option.
Args:
@ -37,8 +31,15 @@ class PollOption(PyrogramType):
The number of users who voted this option.
data (``bytes``):
Unique data that identifies this option (among all the other options in a poll).
Unique data that identifies this option among all the other options in a poll.
"""
def __init__(self,
*,
client: "pyrogram.client.ext.BaseClient",
text: str,
voters: int,
data: bytes):
super().__init__(client)
self.text = text