Hide navigation sidebar
Hide table of contents sidebar
PTB has undergone significant changes in v20. Please read the documentation carefully and also check out the transition guide in the wiki.
Back to top
Toggle table of contents sidebar

# ExternalReplyInfo

class telegram.ExternalReplyInfo(origin, chat=None, message_id=None, link_preview_options=None, animation=None, audio=None, document=None, photo=None, sticker=None, story=None, video=None, video_note=None, voice=None, has_media_spoiler=None, contact=None, dice=None, game=None, giveaway=None, giveaway_winners=None, invoice=None, location=None, poll=None, venue=None, *, api_kwargs=None)

  Bases: `telegram.TelegramObject`

  This object contains information about a message that is being replied to, which may come from another chat or forum topic.

  Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their `origin` is equal.

  Available In

  `telegram.Message.external_reply`

  New in version 20.8.

  Parameters:

    - origin (`telegram.MessageOrigin`) – Origin of the message replied to by the given message.

    - chat (`telegram.Chat`, optional) – Chat the original message belongs to. Available only if the chat is a supergroup or a channel.

    - message_id (`int`, optional) – Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel.

    - link_preview_options (`telegram.LinkPreviewOptions`, optional) – Options used for link preview generation for the original message, if it is a text message

    - animation (`telegram.Animation`, optional) – Message is an animation, information about the animation.

    - audio (`telegram.Audio`, optional) – Message is an audio file, information about the file.

    - document (`telegram.Document`, optional) – Message is a general file, information about the file.

    - photo (Sequence[`telegram.PhotoSize`], optional) – Message is a photo, available sizes of the photo.

    - sticker (`telegram.Sticker`, optional) – Message is a sticker, information about the sticker.

    - story (`telegram.Story`, optional) – Message is a forwarded story.

    - video (`telegram.Video`, optional) – Message is a video, information about the video.

    - video_note (`telegram.VideoNote`, optional) – Message is a video note, information about the video message.

    - voice (`telegram.Voice`, optional) – Message is a voice message, information about the file.

    - has_media_spoiler (`bool`, optional) – `True`, if the message media is covered by a spoiler animation.

    - contact (`telegram.Contact`, optional) – Message is a shared contact, information about the contact.

    - dice (`telegram.Dice`, optional) – Message is a dice with random value.

    - game (`telegram.Game`. optional) – Message is a game, information about the game.

    - giveaway (`telegram.Giveaway`, optional) – Message is a scheduled giveaway, information about the giveaway.

    - giveaway_winners (`telegram.GiveawayWinners`, optional) – A giveaway with public winners was completed.

    - invoice (`telegram.Invoice`, optional) – Message is an invoice for a payment, information about the invoice.

    - location (`telegram.Location`, optional) – Message is a shared location, information about the location.

    - poll (`telegram.Poll`, optional) – Message is a native poll, information about the poll.

    - venue (`telegram.Venue`, optional) – Message is a venue, information about the venue.

  origin

    Origin of the message replied to by the given message.

    Type:

      `telegram.MessageOrigin`

  chat

    Optional. Chat the original message belongs to. Available only if the chat is a supergroup or a channel.

    Type:

      `telegram.Chat`

  message_id

    Optional. Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel.

    Type:

      `int`

  link_preview_options

    Optional. Options used for link preview generation for the original message, if it is a text message.

    Type:

      `telegram.LinkPreviewOptions`

  animation

    Optional. Message is an animation, information about the animation.

    Type:

      `telegram.Animation`

  audio

    Optional. Message is an audio file, information about the file.

    Type:

      `telegram.Audio`

  document

    Optional. Message is a general file, information about the file.

    Type:

      `telegram.Document`

  photo

    Optional. Message is a photo, available sizes of the photo.

    Type:

      Tuple[`telegram.PhotoSize`]

  sticker

    Optional. Message is a sticker, information about the sticker.

    Type:

      `telegram.Sticker`

  story

    Optional. Message is a forwarded story.

    Type:

      `telegram.Story`

  video

    Optional. Message is a video, information about the video.

    Type:

      `telegram.Video`

  video_note

    Optional. Message is a video note, information about the video message.

    Type:

      `telegram.VideoNote`

  voice

    Optional. Message is a voice message, information about the file.

    Type:

      `telegram.Voice`

  has_media_spoiler

    Optional. `True`, if the message media is covered by a spoiler animation.

    Type:

      `bool`

  contact

    Optional. Message is a shared contact, information about the contact.

    Type:

      `telegram.Contact`

  dice

    Optional. Message is a dice with random value.

    Type:

      `telegram.Dice`

  game

    Optional. Message is a game, information about the game.

    Type:

      `telegram.Game`

  giveaway

    Optional. Message is a scheduled giveaway, information about the giveaway.

    Type:

      `telegram.Giveaway`

  giveaway_winners

    Optional. A giveaway with public winners was completed.

    Type:

      `telegram.GiveawayWinners`

  invoice

    Optional. Message is an invoice for a payment, information about the invoice.

    Type:

      `telegram.Invoice`

  location

    Optional. Message is a shared location, information about the location.

    Type:

      `telegram.Location`

  poll

    Optional. Message is a native poll, information about the poll.

    Type:

      `telegram.Poll`

  venue

    Optional. Message is a venue, information about the venue.

    Type:

      `telegram.Venue`

  classmethod de_json(data, bot)

    See `telegram.TelegramObject.de_json`.