pub enum MessageKind {
Show 23 variants
Text {
data: String,
entities: Vec<MessageEntity>,
},
Audio {
data: Audio,
},
Document {
data: Document,
caption: Option<String>,
},
Photo {
data: Vec<PhotoSize>,
caption: Option<String>,
media_group_id: Option<String>,
},
Sticker {
data: Sticker,
},
Video {
data: Video,
caption: Option<String>,
media_group_id: Option<String>,
},
Voice {
data: Voice,
},
VideoNote {
data: VideoNote,
},
Contact {
data: Contact,
},
Location {
data: Location,
},
Poll {
data: Poll,
},
Venue {
data: Venue,
},
NewChatMembers {
data: Vec<User>,
},
LeftChatMember {
data: User,
},
NewChatTitle {
data: String,
},
NewChatPhoto {
data: Vec<PhotoSize>,
},
DeleteChatPhoto,
GroupChatCreated,
SupergroupChatCreated,
ChannelChatCreated,
MigrateToChatId {
data: i64,
},
MigrateFromChatId {
data: i64,
},
PinnedMessage {
data: Box<MessageOrChannelPost>,
},
// some variants omitted
}Expand description
Kind of the message.
Variants§
Text
Text message.
Fields
entities: Vec<MessageEntity>Special entities like usernames, URLs, bot commands, etc. that appear in the text
Audio
Message is an audio file.
Document
Message is a general file.
Fields
Photo
Message is a photo.
Fields
Sticker
Message is a sticker.
Video
Message is a video.
Fields
Voice
Message is a voice message.
VideoNote
Message is a video note.
Contact
Message is a shared contact.
Location
Message is a shared location.
Poll
Message is a poll.
Venue
Message is a venue.
NewChatMembers
New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)
LeftChatMember
A member was removed from the group.
NewChatTitle
New chat title.
NewChatPhoto
New chat photo.
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 a very first message in a channel.
MigrateToChatId
The group has been migrated to a supergroup.
MigrateFromChatId
The supergroup has been migrated from a group.
PinnedMessage
Specified message was pinned.
Fields
data: Box<MessageOrChannelPost>Trait Implementations§
Source§impl Clone for MessageKind
impl Clone for MessageKind
Source§fn clone(&self) -> MessageKind
fn clone(&self) -> MessageKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MessageKind
impl Debug for MessageKind
Source§impl MessageGetFiles for MessageKind
impl MessageGetFiles for MessageKind
Source§impl MessageText for MessageKind
impl MessageText for MessageKind
Source§impl PartialEq for MessageKind
impl PartialEq for MessageKind
Source§fn eq(&self, other: &MessageKind) -> bool
fn eq(&self, other: &MessageKind) -> bool
self and other values to be equal, and is used by ==.