GetPollVotesRequest
Only users can use this request. See code examples.
---functions--- messages.getPollVotes#b86e380e flags:# peer:InputPeer id:int option:flags.0?bytes offset:flags.1?string limit:int = messages.VotesList
Returns
| messages.VotesList |
This type can only be an instance of:
| VotesList |
Parameters
| peer | InputPeer | Anything entity-like will work if the library can find its Input version (e.g., usernames, Peer, User or Channel objects, etc.). |
| id | int | |
| limit | int | |
| option | bytes | This argument defaults to None and can be omitted. |
| offset | string | This argument defaults to None and can be omitted. |
Known RPC errors
This request can cause 2 known errors:
BroadcastForbiddenError | The request cannot be used in broadcast channels. |
PollVoteRequiredError | Cast a vote in the poll before calling this method. |
You can import these from telethon.errors.
Example
from telethon.sync import TelegramClient
from telethon import functions, types
with TelegramClient(name, api_id, api_hash) as client:
result = client(functions.messages.GetPollVotesRequest(
peer='username',
id=42,
limit=100,
option=b'arbitrary\x7f data \xfa here',
offset='some string here'
))
print(result.stringify())