InputPollOption

class telegram.InputPollOption(text, text_parse_mode=None, text_entities=None, *, api_kwargs=None)[source]

Bases: telegram.TelegramObject

This object contains information about one answer option in a poll to be sent.

Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their text is equal.

Added in version 21.2.

Parameters:
text[source]

Option text, 1-100 characters.

Type:

str

text_parse_mode[source]

Optional. Mode for parsing entities. See telegram.constants.ParseMode and formatting options for more details. Currently, only custom emoji entities are allowed.

Type:

str

text_entities[source]

Special entities that appear in the option text. It can be specified instead of text_parse_mode. Currently, only custom emoji entities are allowed. This list is empty if the text does not contain entities.

Type:

Sequence[telegram.MessageEntity]

classmethod de_json(data, bot=None)[source]

See telegram.TelegramObject.de_json().