InputPollOption¶
- class telegram.InputPollOption(text, text_parse_mode=None, text_entities=None, media=None, *, api_kwargs=None)[source]¶
Bases:
telegram.TelegramObjectThis 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
textis equal.Use In
Added in version 21.2.
- Parameters:
text_parse_mode (
str, optional) – Mode for parsing entities. Seetelegram.constants.ParseModeand formatting options for more details. Currently, only custom emoji entities are allowed.text_entities (Sequence[
telegram.MessageEntity], optional) – Special entities that appear in the optiontext. It can be specified instead oftext_parse_mode. Currently, only custom emoji entities are allowed. This list is empty if the text does not contain entities.media (
telegram.InputPollOptionMedia, optional) –Media added to the poll option.
Added in version 22.8.
- text_parse_mode[source]¶
Optional. Mode for parsing entities. See
telegram.constants.ParseModeand formatting options for more details. Currently, only custom emoji entities are allowed.- Type:
- text_entities[source]¶
Special entities that appear in the option
text. It can be specified instead oftext_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(). Themediafield will not be included for deserialization.Deprecated since version 22.8: This class is input only and will be removed in the next version.