mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 21:38:04 +00:00
Fix poll docstrings and vote_poll wrong attribute access
This commit is contained in:
parent
46d206610e
commit
098b06d1b7
@ -53,7 +53,7 @@ class VotePoll(BaseClient):
|
|||||||
functions.messages.SendVote(
|
functions.messages.SendVote(
|
||||||
peer=self.resolve_peer(chat_id),
|
peer=self.resolve_peer(chat_id),
|
||||||
msg_id=message_id,
|
msg_id=message_id,
|
||||||
options=[poll.options[option]._data]
|
options=[poll.options[option].data]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -21,24 +21,25 @@ from ..pyrogram_type import PyrogramType
|
|||||||
|
|
||||||
|
|
||||||
class PollOption(PyrogramType):
|
class PollOption(PyrogramType):
|
||||||
|
"""This object represents a Poll Option.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
text (``str``):
|
||||||
|
Text of the poll option.
|
||||||
|
|
||||||
|
voters (``int``):
|
||||||
|
The number of users who voted this option.
|
||||||
|
|
||||||
|
data (``bytes``):
|
||||||
|
Unique data that identifies this option among all the other options in a poll.
|
||||||
|
"""
|
||||||
|
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
*,
|
*,
|
||||||
client: "pyrogram.client.ext.BaseClient",
|
client: "pyrogram.client.ext.BaseClient",
|
||||||
text: str,
|
text: str,
|
||||||
voters: int,
|
voters: int,
|
||||||
data: bytes):
|
data: bytes):
|
||||||
"""This object represents a Poll Option.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
text (``str``):
|
|
||||||
Text of the poll option.
|
|
||||||
|
|
||||||
voters (``int``):
|
|
||||||
The number of users who voted this option.
|
|
||||||
|
|
||||||
data (``bytes``):
|
|
||||||
Unique data that identifies this option (among all the other options in a poll).
|
|
||||||
"""
|
|
||||||
super().__init__(client)
|
super().__init__(client)
|
||||||
|
|
||||||
self.text = text
|
self.text = text
|
||||||
|
Loading…
x
Reference in New Issue
Block a user