MessageContent

Enum MessageContent 

Source
pub enum MessageContent {
Show 69 variants MessageText(MessageText), MessageAnimation(MessageAnimation), MessageAudio(MessageAudio), MessageDocument(MessageDocument), MessagePhoto(MessagePhoto), MessageSticker(MessageSticker), MessageVideo(MessageVideo), MessageVideoNote(MessageVideoNote), MessageVoiceNote(MessageVoiceNote), MessageExpiredPhoto, MessageExpiredVideo, MessageExpiredVideoNote, MessageExpiredVoiceNote, MessageLocation(MessageLocation), MessageVenue(MessageVenue), MessageContact(MessageContact), MessageAnimatedEmoji(MessageAnimatedEmoji), MessageDice(MessageDice), MessageGame(MessageGame), MessagePoll(MessagePoll), MessageStory(MessageStory), MessageInvoice(MessageInvoice), MessageCall(MessageCall), MessageVideoChatScheduled(MessageVideoChatScheduled), MessageVideoChatStarted(MessageVideoChatStarted), MessageVideoChatEnded(MessageVideoChatEnded), MessageInviteVideoChatParticipants(MessageInviteVideoChatParticipants), MessageBasicGroupChatCreate(MessageBasicGroupChatCreate), MessageSupergroupChatCreate(MessageSupergroupChatCreate), MessageChatChangeTitle(MessageChatChangeTitle), MessageChatChangePhoto(MessageChatChangePhoto), MessageChatDeletePhoto, MessageChatAddMembers(MessageChatAddMembers), MessageChatJoinByLink, MessageChatJoinByRequest, MessageChatDeleteMember(MessageChatDeleteMember), MessageChatUpgradeTo(MessageChatUpgradeTo), MessageChatUpgradeFrom(MessageChatUpgradeFrom), MessagePinMessage(MessagePinMessage), MessageScreenshotTaken, MessageChatSetBackground(MessageChatSetBackground), MessageChatSetTheme(MessageChatSetTheme), MessageChatSetMessageAutoDeleteTime(MessageChatSetMessageAutoDeleteTime), MessageChatBoost(MessageChatBoost), MessageForumTopicCreated(MessageForumTopicCreated), MessageForumTopicEdited(MessageForumTopicEdited), MessageForumTopicIsClosedToggled(MessageForumTopicIsClosedToggled), MessageForumTopicIsHiddenToggled(MessageForumTopicIsHiddenToggled), MessageSuggestProfilePhoto(MessageSuggestProfilePhoto), MessageCustomServiceAction(MessageCustomServiceAction), MessageGameScore(MessageGameScore), MessagePaymentSuccessful(MessagePaymentSuccessful), MessagePaymentSuccessfulBot(MessagePaymentSuccessfulBot), MessageGiftedPremium(MessageGiftedPremium), MessagePremiumGiftCode(MessagePremiumGiftCode), MessagePremiumGiveawayCreated, MessagePremiumGiveaway(MessagePremiumGiveaway), MessagePremiumGiveawayCompleted(MessagePremiumGiveawayCompleted), MessagePremiumGiveawayWinners(MessagePremiumGiveawayWinners), MessageContactRegistered, MessageUsersShared(MessageUsersShared), MessageChatShared(MessageChatShared), MessageBotWriteAccessAllowed(MessageBotWriteAccessAllowed), MessageWebAppDataSent(MessageWebAppDataSent), MessageWebAppDataReceived(MessageWebAppDataReceived), MessagePassportDataSent(MessagePassportDataSent), MessagePassportDataReceived(MessagePassportDataReceived), MessageProximityAlertTriggered(MessageProximityAlertTriggered), MessageUnsupported,
}

Variants§

§

MessageText(MessageText)

A text message

§

MessageAnimation(MessageAnimation)

An animation message (GIF-style).

§

MessageAudio(MessageAudio)

An audio message

§

MessageDocument(MessageDocument)

A document message (general file)

§

MessagePhoto(MessagePhoto)

A photo message

§

MessageSticker(MessageSticker)

A sticker message

§

MessageVideo(MessageVideo)

A video message

§

MessageVideoNote(MessageVideoNote)

A video note message

§

MessageVoiceNote(MessageVoiceNote)

A voice note message

§

MessageExpiredPhoto

A self-destructed photo message

§

MessageExpiredVideo

A self-destructed video message

§

MessageExpiredVideoNote

A self-destructed video note message

§

MessageExpiredVoiceNote

A self-destructed voice note message

§

MessageLocation(MessageLocation)

A message with a location

§

MessageVenue(MessageVenue)

A message with information about a venue

§

MessageContact(MessageContact)

A message with a user contact

§

MessageAnimatedEmoji(MessageAnimatedEmoji)

A message with an animated emoji

§

MessageDice(MessageDice)

A dice message. The dice value is randomly generated by the server

§

MessageGame(MessageGame)

A message with a game

§

MessagePoll(MessagePoll)

A message with a poll

§

MessageStory(MessageStory)

A message with a forwarded story

§

MessageInvoice(MessageInvoice)

A message with an invoice from a bot. Use getInternalLink with internalLinkTypeBotStart to share the invoice

§

MessageCall(MessageCall)

A message with information about an ended call

§

MessageVideoChatScheduled(MessageVideoChatScheduled)

A new video chat was scheduled

§

MessageVideoChatStarted(MessageVideoChatStarted)

A newly created video chat

§

MessageVideoChatEnded(MessageVideoChatEnded)

A message with information about an ended video chat

§

MessageInviteVideoChatParticipants(MessageInviteVideoChatParticipants)

A message with information about an invitation to a video chat

§

MessageBasicGroupChatCreate(MessageBasicGroupChatCreate)

A newly created basic group

§

MessageSupergroupChatCreate(MessageSupergroupChatCreate)

A newly created supergroup or channel

§

MessageChatChangeTitle(MessageChatChangeTitle)

An updated chat title

§

MessageChatChangePhoto(MessageChatChangePhoto)

An updated chat photo

§

MessageChatDeletePhoto

A deleted chat photo

§

MessageChatAddMembers(MessageChatAddMembers)

New chat members were added

A new member joined the chat via an invite link

§

MessageChatJoinByRequest

A new member was accepted to the chat by an administrator

§

MessageChatDeleteMember(MessageChatDeleteMember)

A chat member was deleted

§

MessageChatUpgradeTo(MessageChatUpgradeTo)

A basic group was upgraded to a supergroup and was deactivated as the result

§

MessageChatUpgradeFrom(MessageChatUpgradeFrom)

A supergroup has been created from a basic group

§

MessagePinMessage(MessagePinMessage)

A message has been pinned

§

MessageScreenshotTaken

A screenshot of a message in the chat has been taken

§

MessageChatSetBackground(MessageChatSetBackground)

A new background was set in the chat

§

MessageChatSetTheme(MessageChatSetTheme)

A theme in the chat has been changed

§

MessageChatSetMessageAutoDeleteTime(MessageChatSetMessageAutoDeleteTime)

The auto-delete or self-destruct timer for messages in the chat has been changed

§

MessageChatBoost(MessageChatBoost)

The chat was boosted by the sender of the message

§

MessageForumTopicCreated(MessageForumTopicCreated)

A forum topic has been created

§

MessageForumTopicEdited(MessageForumTopicEdited)

A forum topic has been edited

§

MessageForumTopicIsClosedToggled(MessageForumTopicIsClosedToggled)

A forum topic has been closed or opened

§

MessageForumTopicIsHiddenToggled(MessageForumTopicIsHiddenToggled)

A General forum topic has been hidden or unhidden

§

MessageSuggestProfilePhoto(MessageSuggestProfilePhoto)

A profile photo was suggested to a user in a private chat

§

MessageCustomServiceAction(MessageCustomServiceAction)

A non-standard action has happened in the chat

§

MessageGameScore(MessageGameScore)

A new high score was achieved in a game

§

MessagePaymentSuccessful(MessagePaymentSuccessful)

A payment has been completed

§

MessagePaymentSuccessfulBot(MessagePaymentSuccessfulBot)

A payment has been completed; for bots only

§

MessageGiftedPremium(MessageGiftedPremium)

Telegram Premium was gifted to the user

§

MessagePremiumGiftCode(MessagePremiumGiftCode)

A Telegram Premium gift code was created for the user

§

MessagePremiumGiveawayCreated

A Telegram Premium giveaway was created for the chat

§

MessagePremiumGiveaway(MessagePremiumGiveaway)

A Telegram Premium giveaway

§

MessagePremiumGiveawayCompleted(MessagePremiumGiveawayCompleted)

A Telegram Premium giveaway without public winners has been completed for the chat

§

MessagePremiumGiveawayWinners(MessagePremiumGiveawayWinners)

A Telegram Premium giveaway with public winners has been completed for the chat

§

MessageContactRegistered

A contact has registered with Telegram

§

MessageUsersShared(MessageUsersShared)

The current user shared users, which were requested by the bot

§

MessageChatShared(MessageChatShared)

The current user shared a chat, which was requested by the bot

§

MessageBotWriteAccessAllowed(MessageBotWriteAccessAllowed)

The user allowed the bot to send messages

§

MessageWebAppDataSent(MessageWebAppDataSent)

Data from a Web App has been sent to a bot

§

MessageWebAppDataReceived(MessageWebAppDataReceived)

Data from a Web App has been received; for bots only

§

MessagePassportDataSent(MessagePassportDataSent)

Telegram Passport data has been sent to a bot

§

MessagePassportDataReceived(MessagePassportDataReceived)

Telegram Passport data has been received; for bots only

§

MessageProximityAlertTriggered(MessageProximityAlertTriggered)

A user in the chat came within proximity alert range

§

MessageUnsupported

A message content that is not supported in the current TDLib version

Trait Implementations§

Source§

impl Clone for MessageContent

Source§

fn clone(&self) -> MessageContent

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MessageContent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for MessageContent

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for MessageContent

Source§

fn eq(&self, other: &MessageContent) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for MessageContent

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for MessageContent

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,