Skip to main content

sponsoredMessage

A sponsored message.

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

Fields​

NameTypeRequiredDescription
Recommendedbool—Whether the message needs to be labeled as "recommended" instead of "sponsored"
CanReportbool—Whether 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[]MessageEntityClass—Message entities for styled text in message.
PhotoPhotoClass—If set, contains a custom profile photo bubble that should be displayed for the sponsored message, like for messages sent in groups.
MediaMessageMediaClass—If set, contains some media.
ColorPeerColorClass—If set, the sponsored message should use the message accent color » specified in color.
ButtonTextstringyesLabel of the sponsored message button.
SponsorInfostring—If set, contains additional information about the sponsor to be shown along with the message.
AdditionalInfostring—If set, contains additional information about the sponsored message to be shown along with the message.
MinDisplayDurationint—For sponsored messages to show on channel videos », allow the user to hide the ad only after the specified amount of seconds.
MaxDisplayDurationint—For sponsored messages to show on channel videos », autohide the ad after after the specified amount of seconds.

References​