pub enum MessageData {
Show 63 variants
Animation(Animation),
AutoDeleteTimerChanged(MessageDataAutoDeleteTimer),
BoostAdded(Integer),
ChannelChatCreated,
ChatBackgroundSet(ChatBackground),
ChatShared(MessageDataChatShared),
Checklist(Checklist),
ChecklistTasksAdded(ChecklistTasksAdded),
ChecklistTasksDone(ChecklistTasksDone),
ConnectedWebsite(String),
Contact(Contact),
DeleteChatPhoto,
Dice(Dice),
DirectMessagePriceChanged(MessageDataDirectMessagePriceChanged),
ForumTopicClosed,
ForumTopicCreated(MessageDataForumTopicCreated),
ForumTopicEdited(MessageDataForumTopicEdited),
ForumTopicReopened,
Game(Game),
Gift(GiftInfo),
GeneralForumTopicHidden,
GeneralForumTopicUnhidden,
Giveaway(Giveaway),
GiveawayCreated(GiveawayCreated),
GiveawayCompleted(GiveawayCompleted),
GiveawayWinners(GiveawayWinners),
GroupChatCreated,
Invoice(Invoice),
LeftChatMember(User),
Location(Location),
MigrateFromChatId(Integer),
MigrateToChatId(Integer),
NewChatMembers(Vec<User>),
NewChatPhoto(Vec<PhotoSize>),
NewChatTitle(String),
PaidMedia(PaidMediaInfo),
PaidMessagePriceChanged(MessageDataPaidMessagePriceChanged),
PassportData(PassportData),
PinnedMessage(MaybeInaccessibleMessage),
Poll(Poll),
ProximityAlertTriggered(MessageDataProximityAlert),
RefundedPayment(RefundedPayment),
Sticker(Sticker),
Story(Story),
SuccessfulPayment(SuccessfulPayment),
SupergroupChatCreated,
UniqueGift(UniqueGiftInfo),
UsersShared(MessageDataUsersShared),
Venue(Venue),
VideoNote(VideoNote),
VideoChatEnded(MessageDataVideoChatEnded),
VideoChatParticipantsInvited(MessageDataVideoChatParticipantsInvited),
VideoChatScheduled(MessageDataVideoChatScheduled),
VideoChatStarted,
WebAppData(WebAppData),
WriteAccessAllowed(MessageDataWriteAccess),
Audio(MessageDataAudio),
Document(MessageDataDocument),
Photo(MessageDataPhoto),
Text(Text),
Video(MessageDataVideo),
Voice(MessageDataVoice),
Unknown(Value),
}
Expand description
Represents a message data.
Variants§
Animation(Animation)
Information about the animation.
AutoDeleteTimerChanged(MessageDataAutoDeleteTimer)
Auto-delete timer settings changed.
BoostAdded(Integer)
Service message: user boosted the chat.
Contains a number of boosts added by the user.
ChannelChatCreated
The channel has been created.
This field can‘t be received in a message coming through updates,
because bot can’t be a member of a channel when it is created.
It can only be found in the reply_to
field of the crate::types::Message
struct
if someone replies to a very first message in a channel.
ChatBackgroundSet(ChatBackground)
Chat background set.
A chat was shared with the bot.
Checklist(Checklist)
Message is a checklist.
ChecklistTasksAdded(ChecklistTasksAdded)
Tasks were added to a checklist.
ChecklistTasksDone(ChecklistTasksDone)
Some tasks in a checklist were marked as done or not done.
ConnectedWebsite(String)
The domain name of the website on which the user has logged in.
Contact(Contact)
Information about the shared contact.
DeleteChatPhoto
The chat photo was deleted.
Dice(Dice)
A dice with a random value.
DirectMessagePriceChanged(MessageDataDirectMessagePriceChanged)
The price for paid messages in the corresponding direct messages chat of a channel has changed.
ForumTopicClosed
Forum topic closed.
ForumTopicCreated(MessageDataForumTopicCreated)
Forum topic created.
ForumTopicEdited(MessageDataForumTopicEdited)
Forum topic edited.
ForumTopicReopened
Forum topic reopened.
Game(Game)
Information about the game.
Gift(GiftInfo)
A service message about a sent or received regular gift.
GeneralForumTopicHidden
The ‘General’ forum topic hidden.
The ‘General’ forum topic unhidden.
Giveaway(Giveaway)
A scheduled giveaway.
GiveawayCreated(GiveawayCreated)
Service message: a scheduled giveaway was created.
GiveawayCompleted(GiveawayCompleted)
Service message: a giveaway without public winners was completed.
GiveawayWinners(GiveawayWinners)
A giveaway with public winners was completed.
GroupChatCreated
The group has been created.
Invoice(Invoice)
Information about the invoice for a payment.
LeftChatMember(User)
A member was removed from the group.
This member may be the bot itself.
Location(Location)
Information about the shared location.
MigrateFromChatId(Integer)
The supergroup has been migrated from a group with the specified identifier.
MigrateToChatId(Integer)
The group has been migrated to a supergroup with the specified identifier.
NewChatMembers(Vec<User>)
New members that were added to the group or supergroup.
The bot itself may be one of these members.
NewChatPhoto(Vec<PhotoSize>)
A chat photo was change to this value.
NewChatTitle(String)
A chat title was changed to this value.
PaidMedia(PaidMediaInfo)
Message contains paid media; information about the paid media.
PaidMessagePriceChanged(MessageDataPaidMessagePriceChanged)
A service message about the changed price for paid messages.
PassportData(PassportData)
Telegram Passport data.
PinnedMessage(MaybeInaccessibleMessage)
Specified message was pinned.
Note that the Message object in variant will not contain
further reply_to
field even if it is itself a reply.
Poll(Poll)
Information about the native poll.
ProximityAlertTriggered(MessageDataProximityAlert)
A user in the chat triggered another user’s proximity alert while sharing Live Location.
RefundedPayment(RefundedPayment)
A service message about a refunded payment, information about the payment.
Sticker(Sticker)
Information about the sticker.
Story(Story)
A forwarded story.
SuccessfulPayment(SuccessfulPayment)
Information about the successful payment.
SupergroupChatCreated
The supergroup has been created.
This field can‘t be received in a message coming through updates,
because bot can’t be a member of a supergroup when it is created
It can only be found in the reply_to
field of the crate::types::Message
struct
if someone replies to a very first message
in a directly created supergroup.
UniqueGift(UniqueGiftInfo)
A service message about a sent or received unique gift.
A user was shared with the bot.
Venue(Venue)
Information about the venue.
VideoNote(VideoNote)
Information about the video note.
VideoChatEnded(MessageDataVideoChatEnded)
A video chat ended in the chat.
VideoChatParticipantsInvited(MessageDataVideoChatParticipantsInvited)
New members invited to a video chat.
VideoChatScheduled(MessageDataVideoChatScheduled)
A video chat scheduled in the chat.
VideoChatStarted
A video chat started in the chat.
WebAppData(WebAppData)
Data sent by a Web App.
WriteAccessAllowed(MessageDataWriteAccess)
The user allowed the bot to write messages
after adding it to the attachment or side menu,
launching a Web App from a link,
or accepting an explicit request from a Web App
sent by the method requestWriteAccess
.
Audio(MessageDataAudio)
Describes the audio.
Document(MessageDataDocument)
Describes the document.
Photo(MessageDataPhoto)
Available sizes of the photo.
Text(Text)
The actual UTF-8 text of the message; 0-4096 characters.
Video(MessageDataVideo)
Describes the video.
Voice(MessageDataVoice)
Describes the voice.
Unknown(Value)
Contains arbitrary data for future variants.
Trait Implementations§
Source§impl Clone for MessageData
impl Clone for MessageData
Source§fn clone(&self) -> MessageData
fn clone(&self) -> MessageData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more