Enum rtdlib::types::MessageContent [−][src]
pub enum MessageContent {
Show 40 variants
MessageAnimation(MessageAnimation),
MessageAudio(MessageAudio),
MessageBasicGroupChatCreate(MessageBasicGroupChatCreate),
MessageCall(MessageCall),
MessageChatAddMembers(MessageChatAddMembers),
MessageChatChangePhoto(MessageChatChangePhoto),
MessageChatChangeTitle(MessageChatChangeTitle),
MessageChatDeleteMember(MessageChatDeleteMember),
MessageChatDeletePhoto(MessageChatDeletePhoto),
MessageChatJoinByLink(MessageChatJoinByLink),
MessageChatSetTtl(MessageChatSetTtl),
MessageChatUpgradeFrom(MessageChatUpgradeFrom),
MessageChatUpgradeTo(MessageChatUpgradeTo),
MessageContact(MessageContact),
MessageContactRegistered(MessageContactRegistered),
MessageCustomServiceAction(MessageCustomServiceAction),
MessageDocument(MessageDocument),
MessageExpiredPhoto(MessageExpiredPhoto),
MessageExpiredVideo(MessageExpiredVideo),
MessageGame(MessageGame),
MessageGameScore(MessageGameScore),
MessageInvoice(MessageInvoice),
MessageLocation(MessageLocation),
MessagePassportDataReceived(MessagePassportDataReceived),
MessagePassportDataSent(MessagePassportDataSent),
MessagePaymentSuccessful(MessagePaymentSuccessful),
MessagePaymentSuccessfulBot(MessagePaymentSuccessfulBot),
MessagePhoto(MessagePhoto),
MessagePinMessage(MessagePinMessage),
MessagePoll(MessagePoll),
MessageScreenshotTaken(MessageScreenshotTaken),
MessageSticker(MessageSticker),
MessageSupergroupChatCreate(MessageSupergroupChatCreate),
MessageText(MessageText),
MessageUnsupported(MessageUnsupported),
MessageVenue(MessageVenue),
MessageVideo(MessageVideo),
MessageVideoNote(MessageVideoNote),
MessageVoiceNote(MessageVoiceNote),
MessageWebsiteConnected(MessageWebsiteConnected),
// some variants omitted
}
Expand description
Contains the content of a message
Variants
An animation message (GIF-style).
Tuple Fields of MessageAnimation
An audio message
Tuple Fields of MessageAudio
0: MessageAudio
A newly created basic group
Tuple Fields of MessageBasicGroupChatCreate
A message with information about an ended call
Tuple Fields of MessageCall
0: MessageCall
New chat members were added
Tuple Fields of MessageChatAddMembers
An updated chat photo
Tuple Fields of MessageChatChangePhoto
An updated chat title
Tuple Fields of MessageChatChangeTitle
A chat member was deleted
Tuple Fields of MessageChatDeleteMember
A deleted chat photo
Tuple Fields of MessageChatDeletePhoto
A new member joined the chat by invite link
Tuple Fields of MessageChatJoinByLink
The TTL (Time To Live) setting messages in a secret chat has been changed
Tuple Fields of MessageChatSetTtl
A supergroup has been created from a basic group
Tuple Fields of MessageChatUpgradeFrom
A basic group was upgraded to a supergroup and was deactivated as the result
Tuple Fields of MessageChatUpgradeTo
A message with a user contact
Tuple Fields of MessageContact
A contact has registered with Telegram
Tuple Fields of MessageContactRegistered
A non-standard action has happened in the chat
Tuple Fields of MessageCustomServiceAction
A document message (general file)
Tuple Fields of MessageDocument
An expired photo message (self-destructed after TTL has elapsed)
Tuple Fields of MessageExpiredPhoto
An expired video message (self-destructed after TTL has elapsed)
Tuple Fields of MessageExpiredVideo
A message with a game
Tuple Fields of MessageGame
0: MessageGame
A new high score was achieved in a game
Tuple Fields of MessageGameScore
A message with an invoice from a bot
Tuple Fields of MessageInvoice
A message with a location
Tuple Fields of MessageLocation
Telegram Passport data has been received; for bots only
Tuple Fields of MessagePassportDataReceived
Telegram Passport data has been sent
Tuple Fields of MessagePassportDataSent
A payment has been completed
Tuple Fields of MessagePaymentSuccessful
A payment has been completed; for bots only
Tuple Fields of MessagePaymentSuccessfulBot
A photo message
Tuple Fields of MessagePhoto
0: MessagePhoto
A message has been pinned
Tuple Fields of MessagePinMessage
A message with a poll
Tuple Fields of MessagePoll
0: MessagePoll
A screenshot of a message in the chat has been taken
Tuple Fields of MessageScreenshotTaken
A sticker message
Tuple Fields of MessageSticker
A newly created supergroup or channel
Tuple Fields of MessageSupergroupChatCreate
A text message
Tuple Fields of MessageText
0: MessageText
Message content that is not supported by the client
Tuple Fields of MessageUnsupported
A message with information about a venue
Tuple Fields of MessageVenue
0: MessageVenue
A video message
Tuple Fields of MessageVideo
0: MessageVideo
A video note message
Tuple Fields of MessageVideoNote
A voice note message
Tuple Fields of MessageVoiceNote
The current user has connected a website by logging in using Telegram Login Widget on it
Tuple Fields of MessageWebsiteConnected
Implementations
pub fn on_message_basic_group_chat_create<F: FnOnce(&MessageBasicGroupChatCreate)>(
&self,
fnc: F
) -> &Self
pub fn on_message_chat_change_photo<F: FnOnce(&MessageChatChangePhoto)>(
&self,
fnc: F
) -> &Self
pub fn on_message_chat_change_title<F: FnOnce(&MessageChatChangeTitle)>(
&self,
fnc: F
) -> &Self
pub fn on_message_chat_delete_member<F: FnOnce(&MessageChatDeleteMember)>(
&self,
fnc: F
) -> &Self
pub fn on_message_chat_delete_photo<F: FnOnce(&MessageChatDeletePhoto)>(
&self,
fnc: F
) -> &Self
pub fn on_message_chat_join_by_link<F: FnOnce(&MessageChatJoinByLink)>(
&self,
fnc: F
) -> &Self
pub fn on_message_chat_upgrade_from<F: FnOnce(&MessageChatUpgradeFrom)>(
&self,
fnc: F
) -> &Self
pub fn on_message_contact_registered<F: FnOnce(&MessageContactRegistered)>(
&self,
fnc: F
) -> &Self
pub fn on_message_custom_service_action<F: FnOnce(&MessageCustomServiceAction)>(
&self,
fnc: F
) -> &Self
pub fn on_message_passport_data_received<F: FnOnce(&MessagePassportDataReceived)>(
&self,
fnc: F
) -> &Self
pub fn on_message_passport_data_sent<F: FnOnce(&MessagePassportDataSent)>(
&self,
fnc: F
) -> &Self
pub fn on_message_payment_successful<F: FnOnce(&MessagePaymentSuccessful)>(
&self,
fnc: F
) -> &Self
pub fn on_message_payment_successful_bot<F: FnOnce(&MessagePaymentSuccessfulBot)>(
&self,
fnc: F
) -> &Self
pub fn on_message_screenshot_taken<F: FnOnce(&MessageScreenshotTaken)>(
&self,
fnc: F
) -> &Self
pub fn on_message_supergroup_chat_create<F: FnOnce(&MessageSupergroupChatCreate)>(
&self,
fnc: F
) -> &Self
pub fn on_message_website_connected<F: FnOnce(&MessageWebsiteConnected)>(
&self,
fnc: F
) -> &Self
Trait Implementations
Performs the conversion.
fn deserialize<D>(deserializer: D) -> Result<MessageContent, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<MessageContent, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for MessageContent
impl Send for MessageContent
impl Sync for MessageContent
impl Unpin for MessageContent
impl UnwindSafe for MessageContent
Blanket Implementations
Mutably borrows from an owned value. Read more