add_poll_answer()¶
- Client.add_poll_answer()
Dynamically add a new answer option to an open poll that supports user-added answers.
This feature is part of Bot API 9.6 poll revolution — only works on polls where
open_answerswas set to True during creation.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.text (
str) – Text of the new answer option to add (1-100 characters).text_entities (List of
MessageEntity, optional) – Special entities in the answer text.parse_mode (
ParseMode, optional) – Parse mode for the text.
- Returns:
Message– On success, the updated poll message is returned.
Example
await app.add_poll_answer(chat_id, message_id, "A new option")