Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Add message.get_poll_option_votes() #373
Conversation
|
A convenience method on |
| @@ -3108,3 +3111,45 @@ def pin(self, disable_notification: bool = None) -> "Message": | |||
| message_id=self.message_id, | |||
| disable_notification=disable_notification | |||
| ) | |||
|
|
|||
| def get_poll_option_votes(self, option: PollOption): | |||
| """Get votes for attached public poll option | |||
JosXa
Aug 26, 2020
Contributor
Maybe "Get votes for an option attached to a public poll"? A bit easier to comprehend
| Raises: | ||
| RPCError: In case of a Telegram RPC error. | ||
| ``ValueError``: If the message doesn't contain a poll or attached poll is anonymous |
| self, | ||
| *, | ||
| client: "pyrogram.BaseClient" = None, | ||
| user: 'pyrogram.User', |
JosXa
Aug 26, 2020
Contributor
Is it normal to use "type.Annotations" style here? Couldn't there be a relative import from the underlying module to use the concrete type instead of using pyrogram.X for that?
Requires testing and design review