sponsoredMessage
A sponsored message.
type tg.SponsoredMessage struct { /* ... */ }
Fields
| Name | Type | Required | Description |
|---|---|---|---|
Recommended | bool | — | Whether the message needs to be labeled as "recommended" instead of "sponsored" |
CanReport | bool | — | Whether this message can be reported as specified here ». |
RandomID | []byte | yes | Message ID |
URL | string | yes | Contains the URL to open when the user clicks on the sponsored message. |
Title | string | yes | Contains the title of the sponsored message. |
Message | string | yes | Sponsored message |
Entities | []MessageEntityClass | — | Message entities for styled text in message. |
Photo | PhotoClass | — | If set, contains a custom profile photo bubble that should be displayed for the sponsored message, like for messages sent in groups. |
Media | MessageMediaClass | — | If set, contains some media. |
Color | PeerColorClass | — | If set, the sponsored message should use the message accent color » specified in color. |
ButtonText | string | yes | Label of the sponsored message button. |
SponsorInfo | string | — | If set, contains additional information about the sponsor to be shown along with the message. |
AdditionalInfo | string | — | If set, contains additional information about the sponsored message to be shown along with the message. |
MinDisplayDuration | int | — | For sponsored messages to show on channel videos », allow the user to hide the ad only after the specified amount of seconds. |
MaxDisplayDuration | int | — | For sponsored messages to show on channel videos », autohide the ad after after the specified amount of seconds. |
References
- Official documentation
- Generated Go reference
- TL definition:
sponsoredMessage#7dbf8673