pub struct SponsoredMessage {
pub message_id: i64,
pub is_recommended: bool,
pub can_be_reported: bool,
pub content: MessageContent,
pub sponsor: AdvertisementSponsor,
pub title: String,
pub button_text: String,
pub accent_color_id: i32,
pub background_custom_emoji_id: i64,
pub additional_info: String,
}Expand description
Describes a sponsored message
Fields§
§message_id: i64Message identifier; unique for the chat to which the sponsored message belongs among both ordinary and sponsored messages
is_recommended: boolTrue, if the message needs to be labeled as “recommended” instead of “sponsored”
can_be_reported: boolTrue, if the message can be reported to Telegram moderators through reportChatSponsoredMessage
content: MessageContentContent of the message. Currently, can be only of the types messageText, messageAnimation, messagePhoto, or messageVideo. Video messages can be viewed fullscreen
sponsor: AdvertisementSponsorInformation about the sponsor of the message
title: StringTitle of the sponsored message
Text for the message action button
accent_color_id: i32Identifier of the accent color for title, button text and message background
background_custom_emoji_id: i64Identifier of a custom emoji to be shown on the message background; 0 if none
additional_info: StringIf non-empty, additional information about the sponsored message to be shown along with the message
Trait Implementations§
Source§impl Clone for SponsoredMessage
impl Clone for SponsoredMessage
Source§fn clone(&self) -> SponsoredMessage
fn clone(&self) -> SponsoredMessage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SponsoredMessage
impl Debug for SponsoredMessage
Source§impl<'de> Deserialize<'de> for SponsoredMessage
impl<'de> Deserialize<'de> for SponsoredMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for SponsoredMessage
impl PartialEq for SponsoredMessage
Source§fn eq(&self, other: &SponsoredMessage) -> bool
fn eq(&self, other: &SponsoredMessage) -> bool
self and other values to be equal, and is used by ==.