Skip to main content

sponsoredMessage

A sponsored message.

type tg.SponsoredMessage struct { /* ... */ }

Fields

NameTypeRequiredDescription
RecommendedboolWhether the message needs to be labeled as "recommended" instead of "sponsored"
CanReportboolWhether this message can be reported as specified here ».
RandomID[]byteyesMessage ID
URLstringyesContains the URL to open when the user clicks on the sponsored message.
TitlestringyesContains the title of the sponsored message.
MessagestringyesSponsored message
Entities[]MessageEntityClassMessage entities for styled text in message.
PhotoPhotoClassIf set, contains a custom profile photo bubble that should be displayed for the sponsored message, like for messages sent in groups.
MediaMessageMediaClassIf set, contains some media.
ColorPeerColorClassIf set, the sponsored message should use the message accent color » specified in color.
ButtonTextstringyesLabel of the sponsored message button.
SponsorInfostringIf set, contains additional information about the sponsor to be shown along with the message.
AdditionalInfostringIf set, contains additional information about the sponsored message to be shown along with the message.
MinDisplayDurationintFor sponsored messages to show on channel videos », allow the user to hide the ad only after the specified amount of seconds.
MaxDisplayDurationintFor sponsored messages to show on channel videos », autohide the ad after after the specified amount of seconds.

References