Raw.SponsoredMessage
A sponsored message.
sponsoredMessage#bdedf566 flags:# recommended:flags.5?true can_report:flags.12?true random_id:bytes url:string title:string message:string entities:flags.1?Vector<MessageEntity> photo:flags.6?Photo color:flags.13?PeerColor button_text:string sponsor_info:flags.7?string additional_info:flags.8?string = SponsoredMessage;
export namespace Raw {
export class SponsoredMessage {
constructor(params: {
recommended?: boolean;
canReport?: boolean;
randomId: Buffer;
url: string;
title: string;
message: string;
entities?: Array<Raw.TypeMessageEntity>;
photo?: Raw.TypePhoto;
color?: Raw.TypePeerColor;
buttonText: string;
sponsorInfo?: string;
additionalInfo?: string;
}) {}
}
}
🚫
This is a types constructor, you can’t use it as method when call invoke.
Layer: 185
Constructor ID: 0xbdedf566
Property
recommended
: boolean or undefinedWhether the message needs to be labeled as “recommended” instead of “sponsored”
canReport
: boolean or undefinedWhether this message can be reported as specified here.
randomId
: BufferMessage id
url
: stringContains the url to open when the user clicks on the sponsored message.
title
: stringContains the title of the sponsored message.
message
: stringSponsored message
entities
: Array of Raw.TypeMessageEntity or undefinedMessage entities for styled text in message.
photo
: Raw.TypePhoto or undefinedIf set, contains a custom profile photo bubble that should be displayed for the sponsored message, like for messages sent in groups.
color
: Raw.TypePeerColor or undefinedIf set, the sponsored message should use the message accent color specified in color.
buttonText
: stringLabel of the sponsored message button.
sponsorInfo
: string or undefinedIf set, contains additional information about the sponsor to be shown along with the message.
additionalInfo
: string or undefinedIf set, contains additional information about the sponsored message to be shown along with the message.