add_poll_option()¶
- Client.add_poll_option()¶
Adds an option to a poll.
Usable by Users Bots
- Parameters:¶
chat_id (``int`` | ``str``) – Unique identifier (int) or username (str) of the target chat. For your personal cloud (Saved Messages) you can simply use “me” or “self”. For a contact that exists in your Telegram address book you can use his phone number (str).
message_id (``int``) – Identifier of the message containing the poll.
option (:obj:`~pyrogram.types.InputPollOption`) – The new option.
- Returns:¶
:obj:`~pyrogram.types.Message` | ``bool`` (On success, an edited message or a service message will be returned (when applicable),)
otherwise, in case a message object couldn’t be returned, True is returned.
Example
await app.add_poll_option( chat_id, message_id, option="Seoul" )