peyk.platforms.telegram.types.text_quote

Classes

TextQuote(text[, entities, position, is_manual])

This object contains information about the quoted part of a message that is replied to by the given message.

class peyk.platforms.telegram.types.text_quote.TextQuote(text: str, entities: List[MessageEntity] | None = None, position: int | None = None, is_manual: bool | None = None)[source]

Bases: object

This object contains information about the quoted part of a message that is replied to by the given message.

Variables:
  • text (str) – Text of the quoted part of a message that is replied to by the given message

  • position (int | None) – Approximate quote position in the original message in UTF-16 code units as specified by the sender

  • entities (List[peyk.platforms.telegram.types.message_entity.MessageEntity] | None) – Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, custom_emoji, and date_time entities are kept in quotes.

  • is_manual (bool | None) – True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.

text: str
entities: List[MessageEntity] | None = None
position: int | None = None
is_manual: bool | None = None
classmethod from_dict(data: dict | None) TextQuote | None[source]

Parse a Telegram API mapping into this type.

Parameters:

data – Raw Telegram API mapping, or None.

Returns:

Parsed type instance, or None when data is None.