get_poll_stats()

async Client.get_poll_stats()

Get statistics for a poll sent in a message.

Usable by Users Bots
Parameters:
  • chat_id (int | str) – Unique identifier (int) or username (str) of the target chat.

  • message_id (int) – Identifier of the message containing the poll.

  • dark (bool, optional) – Whether to use a dark theme for the statistics graph. Defaults to False.

Returns:

PollStats – On success, the poll statistics are returned.

Example

# Get poll statistics
stats = await app.get_poll_stats(chat_id, message_id)
print(stats.votes_graph)