public static class TdApi.SponsoredMessage extends TdApi.Object
| Modifier and Type | Field and Description |
|---|---|
int |
accentColorId
Identifier of the accent color for title, button text and message background.
|
java.lang.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.
|
java.lang.String |
buttonText
Text for the message action button.
|
boolean |
canBeReported
True, if the message can be reported to Telegram moderators through reportChatSponsoredMessage.
|
static 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.
|
java.lang.String |
title
Title of the sponsored message.
|
| Constructor and Description |
|---|
SponsoredMessage()
Describes a sponsored message.
|
SponsoredMessage(long messageId,
boolean isRecommended,
boolean canBeReported,
TdApi.MessageContent content,
TdApi.MessageSponsor sponsor,
java.lang.String title,
java.lang.String buttonText,
int accentColorId,
long backgroundCustomEmojiId,
java.lang.String additionalInfo)
Describes a sponsored message.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getConstructor()
Returns an identifier uniquely determining type of the object.
|
toStringpublic long messageId
public boolean isRecommended
public boolean canBeReported
public TdApi.MessageContent content
public TdApi.MessageSponsor sponsor
public java.lang.String title
public java.lang.String buttonText
public int accentColorId
public long backgroundCustomEmojiId
public java.lang.String additionalInfo
public static final int CONSTRUCTOR
public SponsoredMessage()
public SponsoredMessage(long messageId,
boolean isRecommended,
boolean canBeReported,
TdApi.MessageContent content,
TdApi.MessageSponsor sponsor,
java.lang.String title,
java.lang.String buttonText,
int accentColorId,
long backgroundCustomEmojiId,
java.lang.String additionalInfo)
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 types messageText, messageAnimation, messagePhoto, or messageVideo. Video messages can be viewed fullscreen.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.public int getConstructor()
TdApi.ObjectgetConstructor in class TdApi.Object