pub enum MessageContent {
Show 35 variants
Text {
content: String,
entities: Vec<MessageEntity>,
},
Audio {
content: Audio,
caption: Option<String>,
caption_entities: Option<Vec<MessageEntity>>,
},
Document {
content: Document,
caption: Option<String>,
caption_entities: Option<Vec<MessageEntity>>,
},
Animation {
content: Animation,
caption: Option<String>,
caption_entities: Option<Vec<MessageEntity>>,
},
Video {
content: Video,
caption: Option<String>,
caption_entities: Option<Vec<MessageEntity>>,
media_group_id: Option<String>,
},
Voice {
content: Voice,
caption: Option<String>,
caption_entities: Option<Vec<MessageEntity>>,
},
Photo {
content: Vec<PhotoSize>,
caption: Option<String>,
caption_entities: Option<Vec<MessageEntity>>,
media_group_id: Option<String>,
},
Game {
content: Game,
},
Sticker {
content: Sticker,
},
VideoNote {
content: VideoNote,
},
Contact {
content: Contact,
},
Location {
content: Location,
},
Venue {
content: Venue,
},
Poll {
content: Poll,
},
Dice {
content: Dice,
},
NewChatMembers {
content: Vec<User>,
},
LeftChatMember {
content: User,
},
NewChatTitle {
content: String,
},
NewChatPhoto {
content: Vec<PhotoSize>,
},
MessageAutoDeleteTimerChanged {
content: MessageAutoDeleteTimerChanged,
},
MigrateToChatID {
content: i64,
},
MigrateFromChatID {
content: i64,
},
PinnedMessage {
content: Box<Message>,
},
Invoice {
content: Invoice,
},
SuccessfulPayment {
content: SuccessfulPayment,
},
ProximityAlertTriggered {
content: ProximityAlertTriggered,
},
VoiceChatScheduled {
content: VoiceChatScheduled,
},
VoiceChatStarted {
content: VoiceChatStarted,
},
VoiceChatEnded {
content: VoiceChatEnded,
},
VoiceChatParticipantsInvited {
content: VoiceChatParticipantsInvited,
},
DeleteChatPhoto,
GroupChatCreated,
SupergroupChatCreated,
ChannelChatCreated,
Unknown,
}Expand description
The content of a Message
Variants§
Text
Fields
entities: Vec<MessageEntity>Special entities like usernames, URLs, bot commands, etc. that appear in the text
Audio
Fields
caption_entities: Option<Vec<MessageEntity>>Special entities like usernames, URLs, bot commands, etc. that appear in the caption
Document
Fields
caption_entities: Option<Vec<MessageEntity>>Special entities like usernames, URLs, bot commands, etc. that appear in the caption
Animation
Fields
caption_entities: Option<Vec<MessageEntity>>Special entities like usernames, URLs, bot commands, etc. that appear in the caption
Video
Fields
caption_entities: Option<Vec<MessageEntity>>Special entities like usernames, URLs, bot commands, etc. that appear in the caption
Voice
Fields
caption_entities: Option<Vec<MessageEntity>>Special entities like usernames, URLs, bot commands, etc. that appear in the caption
Photo
Fields
caption_entities: Option<Vec<MessageEntity>>Special entities like usernames, URLs, bot commands, etc. that appear in the caption
Game
Sticker
VideoNote
Contact
Location
Venue
Poll
Dice
NewChatMembers
Fields
LeftChatMember
Fields
NewChatTitle
NewChatPhoto
MessageAutoDeleteTimerChanged
Fields
content: MessageAutoDeleteTimerChangedService message: auto-delete timer settings changed in the chat
MigrateToChatID
MigrateFromChatID
PinnedMessage
Fields
Invoice
SuccessfulPayment
Fields
content: SuccessfulPaymentMessage is a service message about a successful payment, information about the payment.
ProximityAlertTriggered
Fields
content: ProximityAlertTriggeredService message. A user in the chat triggered another user’s proximity alert while sharing Live Location.
VoiceChatScheduled
Fields
content: VoiceChatScheduledService message: voice chat scheduled
VoiceChatStarted
Fields
content: VoiceChatStartedService message: voice chat started
VoiceChatEnded
Fields
content: VoiceChatEndedService message: voice chat ended
VoiceChatParticipantsInvited
Fields
content: VoiceChatParticipantsInvitedService message: new participants invited to a voice chat
DeleteChatPhoto
Service message: the chat photo was deleted
GroupChatCreated
Service message: the group has been created
SupergroupChatCreated
Service message: 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 reply_to_message if someone replies to a very first message in a directly created supergroup.
ChannelChatCreated
Service message: 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 reply_to_message if someone replies to the very first message in a channel.
Unknown
Received a message with an unknown content
Trait Implementations§
Source§impl Clone for MessageContent
impl Clone for MessageContent
Source§fn clone(&self) -> MessageContent
fn clone(&self) -> MessageContent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more