Enum telexide_fork::model::MessageContent[][src]

pub enum MessageContent {
Show 35 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,
}
Expand description

The content of a Message

Variants

Text

Fields

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

Fields

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

Fields

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

Fields

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

Fields

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

Fields

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

Fields

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

Fields

content: Game

Information about the game

Sticker

Fields

content: Sticker

Information about the sticker

VideoNote

Fields

content: VideoNote

Information about the video message

Contact

Fields

content: Contact

Information about the shared contact

Location

Fields

content: Location

Information about the shared location

Venue

Fields

content: Venue

Information about the venue

Poll

Fields

content: Poll

Information about the native poll

Dice

Fields

content: Dice

a dice with a random value from 1 to 6

NewChatMembers

Fields

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

Fields

content: User

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

NewChatTitle

Fields

content: String

A chat title was changed to this value

NewChatPhoto

Fields

content: Vec<PhotoSize>

A chat photo was change to this value

MessageAutoDeleteTimerChanged

Fields

content: MessageAutoDeleteTimerChanged

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

MigrateToChatID

Fields

content: i64

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

MigrateFromChatID

Fields

content: i64

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

PinnedMessage

Fields

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

Fields

content: Invoice

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

SuccessfulPayment

Fields

content: SuccessfulPayment

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

ProximityAlertTriggered

Fields

content: ProximityAlertTriggered

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

VoiceChatScheduled

Fields

content: VoiceChatScheduled

Service message: voice chat scheduled

VoiceChatStarted

Fields

content: VoiceChatStarted

Service message: voice chat started

VoiceChatEnded

Fields

content: VoiceChatEnded

Service message: voice chat ended

VoiceChatParticipantsInvited

Fields

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Wrap the input message T in a tonic::Request

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more