Raw.SponsoredMessage

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 undefined

    Whether the message needs to be labeled as “recommended” instead of “sponsored”

  • canReport : boolean or undefined

    Whether this message can be reported as specified here.

  • randomId : Buffer

    Message id

  • url : string

    Contains the url to open when the user clicks on the sponsored message.

  • title : string

    Contains the title of the sponsored message.

  • message : string

    Sponsored message

  • entities : Array of Raw.TypeMessageEntity or undefined

    Message entities for styled text in message.

  • photo : Raw.TypePhoto or undefined

    If 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 undefined

    If set, the sponsored message should use the message accent color specified in color.

  • buttonText : string

    Label of the sponsored message button.

  • sponsorInfo : string or undefined

    If set, contains additional information about the sponsor to be shown along with the message.

  • additionalInfo : string or undefined

    If set, contains additional information about the sponsored message to be shown along with the message.