Information about a message that this message is a reply to

Constructors

Properties

_peers: PeersIndex

Accessors

  • get chat(): null | Peer
  • If replied-to message is available, chat where the message was sent.

    If null, the message was sent in the same chat.

    Returns null | Peer

  • get date(): null | Date
  • For non-same_chat origin, date the original message was sent.

    Returns null | Date

  • get id(): null | number
  • For non-private origin, ID of the replied-to message in the original chat.

    Returns null | number

  • get isForumTopic(): boolean
  • Whether this message was sent to a forum topic

    Returns boolean

  • get isQuote(): boolean
  • Whether this message is quoting another message

    Returns boolean

  • get isScheduled(): boolean
  • Whether this message is a reply to another scheduled message

    Returns boolean

  • get media(): MessageMedia
  • Media contained in the replied-to message

    Only available for non-same_chat origin

    Returns MessageMedia

  • get quoteEntities(): MessageEntity[]
  • Message entities contained in the quote

    Returns MessageEntity[]

  • get quoteOffset(): null | number
  • Offset of the start of the quoteText in the replied-to message.

    Note that this offset should only be used as a hint, as the actual quote offset may be different due to message being edited after the quote

    null if not available, in which case it should be assumed that the quote starts at .indexOf(quoteText) of the replied-to message text.

    Returns null | number

  • get quoteText(): string
  • If this message is a quote, text of the quote.

    For non-same_chat origin, this will be the full text of the replied-to message in case .isQuote is false

    Returns string

  • get sender(): null | PeerSender
  • Sender of the replied-to message (either user or a channel) or their name (for users with private forwards).

    For replies to channel messages, this will be the channel itself.

    null if the sender is not available (for same_chat origin)

    Returns null | PeerSender

  • get threadId(): null | number
  • ID of the replies thread where this message belongs to

    Returns null | number

Methods