pub enum MessageContent {
Show 35 variants
Text {
text: String,
entities: Vec<MessageEntity>,
},
Animation {
animation: Animation,
document: Document,
caption: Option<Caption>,
},
Audio {
audio: Audio,
caption: Option<Caption>,
},
Document {
document: Document,
caption: Option<Caption>,
},
Photo {
photo: Vec<PhotoSize>,
caption: Option<Caption>,
},
Sticker {
sticker: Sticker,
},
Video {
video: Video,
caption: Option<Caption>,
},
VideoNote {
video_note: VideoNote,
},
Voice {
voice: Voice,
caption: Option<Caption>,
},
Contact {
contact: Contact,
},
Dice {
dice: Dice,
},
Game {
game: Game,
},
Poll {
poll: Poll,
},
Venue {
venue: Venue,
location: Location,
},
Location {
location: Location,
},
NewChatMembers {
new_chat_members: Vec<User>,
},
LeftChatMember {
left_chat_member: User,
},
NewChatTitle {
new_chat_title: String,
},
NewChatPhoto {
new_chat_photo: Vec<PhotoSize>,
},
DeleteChatPhoto {
delete_chat_photo: True,
},
GroupChatCreated {
group_chat_created: True,
},
SupergroupChatCreated {
supergroup_chat_created: True,
},
ChannelChatCreated {
channel_chat_created: True,
},
MessageAutoDeleteTimerChanged {
message_auto_delete_timer_changed: MessageAutoDeleteTimerChanged,
},
MigrateToChatId {
migrate_to_chat_id: i64,
},
MigrateFromChatId {
migrate_from_chat_id: i64,
},
PinnedMessage {
pinned_message: Box<Message>,
},
Invoice {
invoice: Invoice,
},
SuccessfulPayment {
successful_payment: SuccessfulPayment,
},
Login {
connected_website: String,
passport_data: PassportData,
},
ProximityAlertTriggered {
proximity_alert_triggered: ProximityAlertTriggered,
},
VideoChatScheduled {
video_chat_scheduled: VideoChatScheduled,
},
VideoChatStarted {
video_chat_started: VideoChatStarted,
},
VideoChatEnded {
video_chat_ended: VideoChatEnded,
},
VideoChatParticipantsInvited {
video_chat_participants_invited: VideoChatParticipantsInvited,
},
}Expand description
The object representing message content
Variants§
Text
Message is a text message
Fields
entities: Vec<MessageEntity>For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text
Animation
Message is an animation
Fields
Audio
Message is an audio file
Fields
Document
Message is a general file
Fields
Photo
Message is a photo
Fields
Sticker
Message is a sticker
Video
Message is a video
Fields
VideoNote
Message is a video note
Voice
Message is a voice message
Fields
Contact
Message is a shared contact
Dice
Message is a dice with random value
Game
Message is a game. More about games »
Poll
Message is a native poll
Venue
Message is a venue.
Fields
Location
Message is a shared location
NewChatMembers
Fields
LeftChatMember
Fields
NewChatTitle
NewChatPhoto
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.
Fields
supergroup_chat_created: TrueService 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 a very first message in a channel.
Fields
channel_chat_created: TrueService 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 a very first message in a channel.
MessageAutoDeleteTimerChanged
Service message: auto-delete timer settings changed in the chat
Fields
message_auto_delete_timer_changed: MessageAutoDeleteTimerChangedService message: auto-delete timer settings changed in the chat
MigrateToChatId
The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.
Fields
migrate_to_chat_id: i64The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.
MigrateFromChatId
The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.
Fields
migrate_from_chat_id: i64The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.
PinnedMessage
Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply.
Fields
Invoice
Message is an invoice for a payment, information about the invoice. More about payments »
Fields
invoice: InvoiceMessage is an invoice for a payment, information about the invoice. More about payments »
SuccessfulPayment
Message is a service message about a successful payment, information about the payment. More about payments »
Fields
successful_payment: SuccessfulPaymentMessage is a service message about a successful payment, information about the payment. More about payments »
Login
Fields
connected_website: StringThe domain name of the website on which the user has logged in. More about Telegram Login »
passport_data: PassportDataTelegram Passport data
ProximityAlertTriggered
Service message. A user in the chat triggered another user’s proximity alert while sharing Live Location.
Fields
proximity_alert_triggered: ProximityAlertTriggeredService message. A user in the chat triggered another user’s proximity alert while sharing Live Location.
VideoChatScheduled
Service message: video chat scheduled
Fields
video_chat_scheduled: VideoChatScheduledService message: video chat scheduled
VideoChatStarted
Service message: video chat started
Fields
video_chat_started: VideoChatStartedService message: video chat started
VideoChatEnded
Service message: video chat ended
Fields
video_chat_ended: VideoChatEndedService message: video chat ended
VideoChatParticipantsInvited
Service message: new participants invited to a video chat
Fields
video_chat_participants_invited: VideoChatParticipantsInvitedService message: new participants invited to a video chat