Class TdApi.SponsoredMessage

java.lang.Object
dev.voroby.springframework.telegram.client.TdApi.Object
dev.voroby.springframework.telegram.client.TdApi.SponsoredMessage
Enclosing class:
TdApi

public static class TdApi.SponsoredMessage extends TdApi.Object
Describes a sponsored message.
  • 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.
    • 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:
  • 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