Enum telbot_types::message::MessageKind [−][src]
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 message
Fields of Text
text: StringThe actual UTF-8 text of the message, 0-4096 characters
entities: Option<Vec<MessageEntity>>Special entities like usernames, URLs, bot commands, etc. that appear in the text
Animation message
Fields of Animation
animation: AnimationInformation about the animation. For backward compatibility, when this field is set, the document field will also be set
document: DocumentInformation about the file
caption: Option<String>Caption for the animation, 0-1024 characters
caption_entities: Option<Vec<MessageEntity>>For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption
Audio message
Fields of Audio
General file message
Fields of Document
Photo message
Fields of Photo
Sticker message
Fields of Sticker
sticker: StickerInformation about the sticker
Video message
Fields of Video
Fields of VideoNote
video_note: VideoNoteInformation about the video message
Voice message
Fields of Voice
Shared contact
Fields of Contact
contact: ContactInformation about the contact
Fields of Dice
dice: DiceFields of Game
game: GameInformation about the game. More about games »
Native Poll
Fields of Poll
poll: PollInformation about the poll
Venue message
Fields of Venue
Shared location
Fields of Location
location: LocationInformation about the location
New chat members message
Fields of NewChatMembers
Chat members leave message
Fields of LeftChatMember
left_chat_member: UserA member was removed from the group, information about them (this member may be the bot itself)
Chat title change message
Fields of NewChatTitle
new_chat_title: StringA chat title was changed to this value
Service message: the chat photo was deleted
Fields of DeleteChatPhoto
delete_chat_photo: boolAlways true
Service message: the group has been created
Fields of GroupChatCreated
group_chat_created: boolAlways true
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.
Fields of SupergroupChatCreated
supergroup_chat_created: boolAlways true
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.
Fields of ChannelChatCreated
channel_chat_created: boolAlways true
Service message: auto-delete timer settings changed in the chat
Fields of MessageAutoDeleteTimerChanged
message_auto_delete_timer_changed: MessageAutoDeleteTimerChangedGroup migration message
Fields of GroupMigrated
Pinned message
Fields of MessagePinned
Invoice for a payment
Fields of Invoice
invoice: InvoiceInformation about the invoice. More about payments »
Service message about a successful payment
Fields of SuccessfulPayment
successful_payment: SuccessfulPaymentInformation about the payment. More about payments »
Login message.
Fields of Login
connected_website: StringThe domain name of the website on which the user has logged in. More about Telegram Login »
passport_data: PassportDataTelegram Passport data
Service message: a user in the chat triggered another user’s proximity alert while sharing Live Location
Fields of ProximityAlertTriggered
proximity_alert_triggered: ProximityAlertTriggeredService message: voice chat scheduled
Fields of VoiceChatScheduled
voice_chat_scheduled: VoiceChatScheduledService message: voice chat started
Fields of VoiceChatStarted
voice_chat_started: VoiceChatStartedService message: voice chat ended
Fields of VoiceChatEnded
voice_chat_ended: VoiceChatEndedService message: new participants invited to a voice chat
Fields of VoiceChatParticipantsInvited
voice_chat_participants_invited: VoiceChatParticipantsInvitedTrait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more