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 and position are equal.

Available In

telegram.Message.quote

New 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.

text[source]

Text of the quoted part of a message that is replied to by the given message.

Type:

str

position[source]

Approximate quote position in the original message in UTF-16 code units as specified by the sender.

Type:

int

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:

bool

classmethod de_json(data, bot)[source]

See telegram.TelegramObject.de_json.