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
Draft
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
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 |
JosXa
Aug 26, 2020
Contributor
Inconsistent docstring style:
RPCError
but
``ValueError``
Inconsistent docstring style:
RPCError
but
``ValueError``
| 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?
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?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Requires testing and design review