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

Text message

Fields of Text

text: String

The 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

Animation message

Fields of Animation

animation: Animation

Information about the animation. For backward compatibility, when this field is set, the document field will also be set

document: Document

Information 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

Audio message

Fields of Audio

audio: Audio

Information about the file

caption: Option<String>

Caption for the audio, 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

Document

General file message

Fields of Document

document: Document

Information about the file

caption: Option<String>

Caption for the document, 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

Photo

Photo message

Fields of Photo

photo: Vec<PhotoSize>

Available sizes of the photo

caption: Option<String>

Caption for the photo, 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

Sticker

Sticker message

Fields of Sticker

sticker: Sticker

Information about the sticker

Video

Video message

Fields of Video

video: Video

Information about the video

caption: Option<String>

Caption for the video, 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

VideoNote

Fields of VideoNote

video_note: VideoNote

Information about the video message

Voice

Voice message

Fields of Voice

voice: Voice

Information about the file

caption: Option<String>

Caption for the voice, 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

Contact

Shared contact

Fields of Contact

contact: Contact

Information about the contact

Dice

Fields of Dice

dice: Dice
Game

Fields of Game

game: Game

Information about the game. More about games »

Poll

Native Poll

Fields of Poll

poll: Poll

Information about the poll

Venue

Venue message

Fields of Venue

venue: Venue

Information about the venue. For backward compatibility, when this field is set, the location field will also be set

location: Location

Information about the location

Location

Shared location

Fields of Location

location: Location

Information about the location

NewChatMembers

New chat members message

Fields of NewChatMembers

new_chat_members: Vec<User>

New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)

LeftChatMember

Chat members leave message

Fields of LeftChatMember

left_chat_member: User

A member was removed from the group, information about them (this member may be the bot itself)

NewChatTitle

Chat title change message

Fields of NewChatTitle

new_chat_title: String

A chat title was changed to this value

DeleteChatPhoto

Service message: the chat photo was deleted

Fields of DeleteChatPhoto

delete_chat_photo: bool

Always true

GroupChatCreated

Service message: the group has been created

Fields of GroupChatCreated

group_chat_created: bool

Always true

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.

Fields of SupergroupChatCreated

supergroup_chat_created: bool

Always true

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.

Fields of ChannelChatCreated

channel_chat_created: bool

Always true

MessageAutoDeleteTimerChanged

Service message: auto-delete timer settings changed in the chat

Fields of MessageAutoDeleteTimerChanged

message_auto_delete_timer_changed: MessageAutoDeleteTimerChanged
GroupMigrated

Group migration message

Fields of GroupMigrated

migrate_to_chat_id: i64

The group has been migrated to a supergroup with the specified identifier.

migrate_from_chat_id: i64

The supergroup has been migrated from a group with the specified identifier.

MessagePinned

Pinned message

Fields of MessagePinned

pinned_message: Box<Message>

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.

Invoice

Invoice for a payment

Fields of Invoice

invoice: Invoice

Information about the invoice. More about payments »

SuccessfulPayment

Service message about a successful payment

Fields of SuccessfulPayment

successful_payment: SuccessfulPayment

Information about the payment. More about payments »

Login

Login message.

Fields of Login

connected_website: String

The domain name of the website on which the user has logged in. More about Telegram Login »

passport_data: PassportData

Telegram Passport data

ProximityAlertTriggered

Service message: a user in the chat triggered another user’s proximity alert while sharing Live Location

Fields of ProximityAlertTriggered

proximity_alert_triggered: ProximityAlertTriggered
VoiceChatScheduled

Service message: voice chat scheduled

Fields of VoiceChatScheduled

voice_chat_scheduled: VoiceChatScheduled
VoiceChatStarted

Service message: voice chat started

Fields of VoiceChatStarted

voice_chat_started: VoiceChatStarted
VoiceChatEnded

Service message: voice chat ended

Fields of VoiceChatEnded

voice_chat_ended: VoiceChatEnded
VoiceChatParticipantsInvited

Service message: new participants invited to a voice chat

Fields of VoiceChatParticipantsInvited

voice_chat_participants_invited: VoiceChatParticipantsInvited

Trait Implementations

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.