Package org.drinkless.tdlib

# Class TdApi.SponsoredMessage

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.SponsoredMessage

Enclosing class:
  TdApi

public static class TdApi.SponsoredMessage extends TdApi.Object
Describes a sponsored message.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `int`
  `accentColorId`
  Identifier of the accent color for title, button text and message background.
  `String`
  `additionalInfo`
  If non-empty, additional information about the sponsored message to be shown along with the message.
  `long`
  `backgroundCustomEmojiId`
  Identifier of a custom emoji to be shown on the message background; 0 if none.
  `String`
  `buttonText`
  Text for the message action button.
  `boolean`
  `canBeReported`
  True, if the message can be reported to Telegram moderators through reportChatSponsoredMessage.
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `TdApi.MessageContent`
  `content`
  Content of the message.
  `boolean`
  `isRecommended`
  True, if the message needs to be labeled as "recommended" instead of "sponsored".
  `long`
  `messageId`
  Message identifier; unique for the chat to which the sponsored message belongs among both ordinary and sponsored messages.
  `TdApi.MessageSponsor`
  `sponsor`
  Information about the sponsor of the message.
  `String`
  `title`
  Title of the sponsored message.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SponsoredMessage()`
  Describes a sponsored message.
  `SponsoredMessage(long messageId, boolean isRecommended, boolean canBeReported, TdApi.MessageContent content, TdApi.MessageSponsor sponsor, String title, String buttonText, int accentColorId, long backgroundCustomEmojiId, String additionalInfo)`
  Describes a sponsored message.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getConstructor()`
  Returns an identifier uniquely determining type of the object.

  ### Methods inherited from class org.drinkless.tdlib.TdApi.Object

  `toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### messageId

    public long messageId
    Message identifier; unique for the chat to which the sponsored message belongs among both ordinary and sponsored messages.

  - ### isRecommended

    public boolean isRecommended
    True, if the message needs to be labeled as "recommended" instead of "sponsored".

  - ### canBeReported

    public boolean canBeReported
    True, if the message can be reported to Telegram moderators through reportChatSponsoredMessage.

  - ### content

    public TdApi.MessageContent content
    Content of the message. Currently, can be only of the type messageText.

  - ### sponsor

    public TdApi.MessageSponsor sponsor
    Information about the sponsor of the message.

  - ### title

    public String title
    Title of the sponsored message.

  - ### buttonText

    public String buttonText
    Text for the message action button.

  - ### accentColorId

    public int accentColorId
    Identifier of the accent color for title, button text and message background.

  - ### backgroundCustomEmojiId

    public long backgroundCustomEmojiId
    Identifier of a custom emoji to be shown on the message background; 0 if none.

  - ### additionalInfo

    public String additionalInfo
    If non-empty, additional information about the sponsored message to be shown along with the message.

  - ### CONSTRUCTOR

    public static final int CONSTRUCTOR
    Identifier uniquely determining type of the object.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### SponsoredMessage

    public SponsoredMessage()
    Describes a sponsored message.

  - ### SponsoredMessage

    public SponsoredMessage(long messageId, boolean isRecommended, boolean canBeReported, TdApi.MessageContent content, TdApi.MessageSponsor sponsor, String title, String buttonText, int accentColorId, long backgroundCustomEmojiId, String additionalInfo)
    Describes a sponsored message.
    Parameters:
      `messageId` - Message identifier; unique for the chat to which the sponsored message belongs among both ordinary and sponsored messages.
      `isRecommended` - True, if the message needs to be labeled as "recommended" instead of "sponsored".
      `canBeReported` - True, if the message can be reported to Telegram moderators through reportChatSponsoredMessage.
      `content` - Content of the message. Currently, can be only of the type messageText.
      `sponsor` - Information about the sponsor of the message.
      `title` - Title of the sponsored message.
      `buttonText` - Text for the message action button.
      `accentColorId` - Identifier of the accent color for title, button text and message background.
      `backgroundCustomEmojiId` - Identifier of a custom emoji to be shown on the message background; 0 if none.
      `additionalInfo` - If non-empty, additional information about the sponsored message to be shown along with the message.

- ## Method Details

  - ### getConstructor

    public int getConstructor()
    Description copied from class: `TdApi.Object`
    Returns an identifier uniquely determining type of the object.
    Specified by:
      `getConstructor` in class `TdApi.Object`
    Returns:
      this.CONSTRUCTOR