Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add message.get_poll_option_votes() #373

Draft
wants to merge 2 commits into
base: develop
from

Conversation

@bakatrouble
Copy link
Contributor

@bakatrouble bakatrouble commented Feb 26, 2020

Requires testing and design review

@JosXa
Copy link
Contributor

@JosXa JosXa commented Aug 26, 2020

@@ -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

This comment has been minimized.

@JosXa

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

This comment has been minimized.

@JosXa

JosXa Aug 26, 2020
Contributor

Inconsistent docstring style:

RPCError

but

``ValueError``

self,
*,
client: "pyrogram.BaseClient" = None,
user: 'pyrogram.User',

This comment has been minimized.

@JosXa

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.