Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# TextQuote

class telegram.TextQuote(text, position, entities=None, is_manual=None, *, api_kwargs=None)

  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`

  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.

  text

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

    Type:

      `str`

  position

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

    Type:

      `int`

  entities

    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

    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=None)

    See `telegram.TelegramObject.de_json()`.