Enum telexide::model::MessageContent[][src]

pub enum MessageContent {
Show variants Text { content: String, entities: Vec<MessageEntity>, }, Audio { content: Audio, caption: Option<String>, caption_entities: Option<Vec<MessageEntity>>, }, Document { content: Document, caption: Option<String>, caption_entities: Option<Vec<MessageEntity>>, }, Animation { content: Animation, caption: Option<String>, caption_entities: Option<Vec<MessageEntity>>, }, Video { content: Video, caption: Option<String>, caption_entities: Option<Vec<MessageEntity>>, media_group_id: Option<String>, }, Voice { content: Voice, caption: Option<String>, caption_entities: Option<Vec<MessageEntity>>, }, Photo { content: Vec<PhotoSize>, caption: Option<String>, caption_entities: Option<Vec<MessageEntity>>, media_group_id: Option<String>, }, Game { content: Game, }, Sticker { content: Sticker, }, VideoNote { content: VideoNote, }, Contact { content: Contact, }, Location { content: Location, }, Venue { content: Venue, }, Poll { content: Poll, }, Dice { content: Dice, }, NewChatMembers { content: Vec<User>, }, LeftChatMember { content: User, }, NewChatTitle { content: String, }, NewChatPhoto { content: Vec<PhotoSize>, }, MessageAutoDeleteTimerChanged { content: MessageAutoDeleteTimerChanged, }, MigrateToChatID { content: i64, }, MigrateFromChatID { content: i64, }, PinnedMessage { content: Box<Message>, }, Invoice { content: Invoice, }, SuccessfulPayment { content: SuccessfulPayment, }, ProximityAlertTriggered { content: ProximityAlertTriggered, }, VoiceChatScheduled { content: VoiceChatScheduled, }, VoiceChatStarted { content: VoiceChatStarted, }, VoiceChatEnded { content: VoiceChatEnded, }, VoiceChatParticipantsInvited { content: VoiceChatParticipantsInvited, }, DeleteChatPhoto, GroupChatCreated, SupergroupChatCreated, ChannelChatCreated, Unknown,
}

The content of a Message

Variants

Text
Show fields

Fields of Text

content: String

The actual UTF-8 text of the message, 0-4096 characters

entities: Vec<MessageEntity>

Special entities like usernames, URLs, bot commands, etc. that appear in the text

Audio
Show fields

Fields of Audio

content: Audio

Information about the audio file

caption: Option<String>

The caption, 0-1024 characters

caption_entities: Option<Vec<MessageEntity>>

Special entities like usernames, URLs, bot commands, etc. that appear in the caption

Document
Show fields

Fields of Document

content: Document

Information about the file

caption: Option<String>

The caption, 0-1024 characters

caption_entities: Option<Vec<MessageEntity>>

Special entities like usernames, URLs, bot commands, etc. that appear in the caption

Animation
Show fields

Fields of Animation

content: Animation

Information about the animation.

caption: Option<String>

The caption, 0-1024 characters

caption_entities: Option<Vec<MessageEntity>>

Special entities like usernames, URLs, bot commands, etc. that appear in the caption

Video
Show fields

Fields of Video

content: Video

Information about the video

caption: Option<String>

The caption, 0-1024 characters

caption_entities: Option<Vec<MessageEntity>>

Special entities like usernames, URLs, bot commands, etc. that appear in the caption

media_group_id: Option<String>

The unique identifier of a media message group this message belongs to

Voice
Show fields

Fields of Voice

content: Voice

Information about the voice file

caption: Option<String>

The caption, 0-1024 characters

caption_entities: Option<Vec<MessageEntity>>

Special entities like usernames, URLs, bot commands, etc. that appear in the caption

Photo
Show fields

Fields of Photo

content: Vec<PhotoSize>

Available sizes of the photo

caption: Option<String>

The caption, 0-1024 characters

caption_entities: Option<Vec<MessageEntity>>

Special entities like usernames, URLs, bot commands, etc. that appear in the caption

media_group_id: Option<String>

The unique identifier of a media message group this message belongs to

Game
Show fields

Fields of Game

content: Game

Information about the game

Sticker
Show fields

Fields of Sticker

content: Sticker

Information about the sticker

VideoNote
Show fields

Fields of VideoNote

content: VideoNote

Information about the video message

Contact
Show fields

Fields of Contact

content: Contact

Information about the shared contact

Location
Show fields

Fields of Location

content: Location

Information about the shared location

Venue
Show fields

Fields of Venue

content: Venue

Information about the venue

Poll
Show fields

Fields of Poll

content: Poll

Information about the native poll

Dice
Show fields

Fields of Dice

content: Dice

a dice with a random value from 1 to 6

NewChatMembers
Show fields

Fields of NewChatMembers

content: 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
Show fields

Fields of LeftChatMember

content: User

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

NewChatTitle
Show fields

Fields of NewChatTitle

content: String

A chat title was changed to this value

NewChatPhoto
Show fields

Fields of NewChatPhoto

content: Vec<PhotoSize>

A chat photo was change to this value

MessageAutoDeleteTimerChanged
Show fields

Fields of MessageAutoDeleteTimerChanged

content: MessageAutoDeleteTimerChanged

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

MigrateToChatID
Show fields

Fields of MigrateToChatID

content: i64

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

MigrateFromChatID
Show fields

Fields of MigrateFromChatID

content: i64

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

PinnedMessage
Show fields

Fields of PinnedMessage

content: 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
Show fields

Fields of Invoice

content: Invoice

Message is an invoice for a payment, information about the invoice.

SuccessfulPayment
Show fields

Fields of SuccessfulPayment

content: SuccessfulPayment

Message is a service message about a successful payment, information about the payment.

ProximityAlertTriggered
Show fields

Fields of ProximityAlertTriggered

content: ProximityAlertTriggered

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

VoiceChatScheduled
Show fields

Fields of VoiceChatScheduled

content: VoiceChatScheduled

Service message: voice chat scheduled

VoiceChatStarted
Show fields

Fields of VoiceChatStarted

content: VoiceChatStarted

Service message: voice chat started

VoiceChatEnded
Show fields

Fields of VoiceChatEnded

content: VoiceChatEnded

Service message: voice chat ended

VoiceChatParticipantsInvited
Show fields

Fields of VoiceChatParticipantsInvited

content: VoiceChatParticipantsInvited

Service message: new participants invited to a voice chat

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 the very first message in a channel.

Unknown

Received a message with an unknown content

Trait Implementations

impl Clone for MessageContent[src]

impl Debug for MessageContent[src]

impl PartialEq<MessageContent> for MessageContent[src]

impl StructuralPartialEq for MessageContent[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CloneAny for T where
    T: Any + Clone
[src]

impl<T> DebugAny for T where
    T: Any + Debug
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> UnsafeAny for T where
    T: Any