SponsoredPeer

class pyrogram.raw.types.SponsoredPeer

A sponsored peer.

Constructor of SponsoredPeer.

Details:
  • Layer: 223

  • ID: C69708D3

Parameters:
  • random_id (bytes) – ID of the sponsored peer, to be passed to messages.viewSponsoredMessage, messages.clickSponsoredMessage or messages.reportSponsoredMessage (the same methods used for sponsored messages &raquo).

  • peer (Peer) – The sponsored peer.

  • sponsor_info (str, optional) – If set, contains additional information about the sponsor to be shown along with the peer.

  • additional_info (str, optional) – If set, contains additional information about the sponsored message to be shown along with the peer.

TL Schema

sponsoredPeer#c69708d3
flags:#
random_id:bytes
peer:Peer
sponsor_info:flags.0?string
additional_info:flags.1?string

= SponsoredPeer

Parameter Tree

SponsoredPeer
├── random_idbytes
├── peerPeer
│ ├── PeerUser
│ │ └── user_idlong
│ ├── PeerChat
│ │ └── chat_idlong
│ └── PeerChannel
│ └── channel_idlong
├── sponsor_infostring (optional)
└── additional_infostring (optional)

Example

SponsoredPeer(
    random_id=b"data",
    peer=PeerUser(user_id=0),
)