TextQuote¶
- class telegram.TextQuote(text, position, entities=None, is_manual=None, *, api_kwargs=None)[source]¶
Bases:
telegram.TelegramObject
This object contains information about the quoted part of a message that is replied to by the given message.
Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their
text
andposition
are equal.Available In
Added in version 20.8.
- Parameters:
text (
str
) – Text of the quoted part of a message that is replied to by the given message.position (
int
) – Approximate quote position in the original message in UTF-16 code units as specified by the sender.entities (Sequence[
telegram.MessageEntity
], optional) – Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are kept in quotes.is_manual (
bool
, optional) –True
, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.
- position[source]¶
Approximate quote position in the original message in UTF-16 code units as specified by the sender.
- Type:
- entities[source]¶
Optional. Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are kept in quotes.
- Type:
tuple[
telegram.MessageEntity
]
- is_manual[source]¶
Optional.
True
, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.- Type: