messages.getPollVotes

Get poll results for non-anonymous polls

Example

const {Api, TelegramClient} = require('telegram');
const {StringSession} = require('telegram/sessions');

const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});

(async function run() {
    const result = await client.invoke(new Api.messages.getPollVotes({
        peer: new Api.InputPeer({...}),
        id: 8742352,
        option: Buffer.from('some bytes here'),
        offset: 'random string here',
        limit: 6055994,
        }));
    console.log(result); // prints the result
})();

TL schema

messages.votesList#823f649 flags:# count:int votes:Vector<MessageUserVote> users:Vector<User> next_offset:flags.0?string = messages.VotesList;
---functions---
messages.getPollVotes#b86e380e flags:# peer:InputPeer id:int option:flags.0?bytes offset:flags.1?string limit:int = messages.VotesList;

Parameters

Note: if no more results are available, the method call will return an empty next_offset; thus, avoid providing the next_offset returned in messages.votesList if it is empty, to avoid an infinite loop.| |limit|int|Number of results to return|

Result

messages.VotesList

Possible errors

Can bots use this methd ?

yes

How users voted in a poll

Last updated