Enum telegram_bot_ars::types::MessageKind
source · pub enum MessageKind {
Show 23 variants
Text {
data: String,
entities: Vec<MessageEntity, Global>,
},
Audio {
data: Audio,
},
Document {
data: Document,
caption: Option<String>,
},
Photo {
data: Vec<PhotoSize, Global>,
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, Global>,
},
LeftChatMember {
data: User,
},
NewChatTitle {
data: String,
},
NewChatPhoto {
data: Vec<PhotoSize, Global>,
},
DeleteChatPhoto,
GroupChatCreated,
SupergroupChatCreated,
ChannelChatCreated,
MigrateToChatId {
data: i64,
},
MigrateFromChatId {
data: i64,
},
PinnedMessage {
data: Box<MessageOrChannelPost, Global>,
},
// some variants omitted
}Expand description
Kind of the message.
Variants§
Text
Fields
entities: Vec<MessageEntity, Global>Special entities like usernames, URLs, bot commands, etc. that appear in the text
Text message.
Audio
Message is an audio file.
Document
Fields
Message is a general file.
Photo
Fields
Message is a photo.
Sticker
Message is a sticker.
Video
Fields
Message is a video.
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
Fields
data: Box<MessageOrChannelPost, Global>Specified message was pinned.
Trait Implementations§
source§impl Clone for MessageKind
impl Clone for MessageKind
source§fn clone(&self) -> MessageKind
fn clone(&self) -> MessageKind
1.0.0 · 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<MessageKind> for MessageKind
impl PartialEq<MessageKind> for MessageKind
source§fn eq(&self, other: &MessageKind) -> bool
fn eq(&self, other: &MessageKind) -> bool
source§impl PartialOrd<MessageKind> for MessageKind
impl PartialOrd<MessageKind> for MessageKind
source§fn partial_cmp(&self, other: &MessageKind) -> Option<Ordering>
fn partial_cmp(&self, other: &MessageKind) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read more