pub enum MessageKind {
Show 33 variants
Text {
text: String,
entities: Option<Vec<MessageEntity>>,
},
Animation {
animation: Animation,
document: Document,
caption: Option<String>,
caption_entities: Option<Vec<MessageEntity>>,
},
Audio {
audio: Audio,
caption: Option<String>,
caption_entities: Option<Vec<MessageEntity>>,
},
Document {
document: Document,
caption: Option<String>,
caption_entities: Option<Vec<MessageEntity>>,
},
Photo {
photo: Vec<PhotoSize>,
caption: Option<String>,
caption_entities: Option<Vec<MessageEntity>>,
},
Sticker {
sticker: Sticker,
},
Video {
video: Video,
caption: Option<String>,
caption_entities: Option<Vec<MessageEntity>>,
},
VideoNote {
video_note: VideoNote,
},
Voice {
voice: Voice,
caption: Option<String>,
caption_entities: Option<Vec<MessageEntity>>,
},
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,
},
DeleteChatPhoto {
delete_chat_photo: bool,
},
GroupChatCreated {
group_chat_created: bool,
},
SupergroupChatCreated {
supergroup_chat_created: bool,
},
ChannelChatCreated {
channel_chat_created: bool,
},
MessageAutoDeleteTimerChanged {
message_auto_delete_timer_changed: MessageAutoDeleteTimerChanged,
},
GroupMigrated {
migrate_to_chat_id: i64,
migrate_from_chat_id: i64,
},
MessagePinned {
pinned_message: Box<Message>,
},
Invoice {
invoice: Invoice,
},
SuccessfulPayment {
successful_payment: SuccessfulPayment,
},
Login {
connected_website: String,
passport_data: PassportData,
},
ProximityAlertTriggered {
proximity_alert_triggered: ProximityAlertTriggered,
},
VoiceChatScheduled {
voice_chat_scheduled: VoiceChatScheduled,
},
VoiceChatStarted {
voice_chat_started: VoiceChatStarted,
},
VoiceChatEnded {
voice_chat_ended: VoiceChatEnded,
},
VoiceChatParticipantsInvited {
voice_chat_participants_invited: VoiceChatParticipantsInvited,
},
}Expand description
Variants of a message.
Variants§
Text
Text message
Fields
entities: Option<Vec<MessageEntity>>Special entities like usernames, URLs, bot commands, etc. that appear in the text
Animation
Animation message
Fields
animation: AnimationInformation about the animation. For backward compatibility, when this field is set, the document field will also be set
caption_entities: Option<Vec<MessageEntity>>For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption
Audio
Audio message
Fields
caption_entities: Option<Vec<MessageEntity>>For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption
Document
General file message
Fields
caption_entities: Option<Vec<MessageEntity>>For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption
Photo
Photo message
Fields
caption_entities: Option<Vec<MessageEntity>>For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption
Sticker
Sticker message
Video
Video message
Fields
caption_entities: Option<Vec<MessageEntity>>For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption
VideoNote
Voice
Voice message
Fields
caption_entities: Option<Vec<MessageEntity>>For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption
Contact
Shared contact
Dice
Game
Fields
game: GameInformation about the game. More about games »
Poll
Native Poll
Venue
Venue message
Fields
Location
Shared location
NewChatMembers
New chat members message
Fields
LeftChatMember
Chat members leave message
Fields
NewChatTitle
Chat title change message
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 variant 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 variant 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: MessageAutoDeleteTimerChangedGroupMigrated
Group migration message
Fields
MessagePinned
Pinned message
Fields
Invoice
Invoice for a payment
Fields
invoice: InvoiceInformation about the invoice. More about payments »
SuccessfulPayment
Service message about a successful payment
Fields
successful_payment: SuccessfulPaymentInformation about the payment. More about payments »
Login
Login message.
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: ProximityAlertTriggeredVoiceChatScheduled
Service message: voice chat scheduled
Fields
voice_chat_scheduled: VoiceChatScheduledVoiceChatStarted
Service message: voice chat started
Fields
voice_chat_started: VoiceChatStartedVoiceChatEnded
Service message: voice chat ended
Fields
voice_chat_ended: VoiceChatEndedVoiceChatParticipantsInvited
Service message: new participants invited to a voice chat
Fields
voice_chat_participants_invited: VoiceChatParticipantsInvited