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: StringThe 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: AudioInformation about the audio file
caption_entities: Option<Vec<MessageEntity>>Special entities like usernames, URLs, bot commands, etc. that appear in the caption
Document
Fields
content: DocumentInformation about the file
caption_entities: Option<Vec<MessageEntity>>Special entities like usernames, URLs, bot commands, etc. that appear in the caption
Animation
Fields
content: AnimationInformation about the animation.
caption_entities: Option<Vec<MessageEntity>>Special entities like usernames, URLs, bot commands, etc. that appear in the caption
Video
Fields
content: VideoInformation about the video
caption_entities: Option<Vec<MessageEntity>>Special entities like usernames, URLs, bot commands, etc. that appear in the caption
Voice
Fields
content: VoiceInformation about the voice file
caption_entities: Option<Vec<MessageEntity>>Special entities like usernames, URLs, bot commands, etc. that appear in the caption
Photo
Fields
caption_entities: Option<Vec<MessageEntity>>Special entities like usernames, URLs, bot commands, etc. that appear in the caption
Game
Fields
content: GameInformation about the game
Sticker
Fields
content: StickerInformation about the sticker
VideoNote
Fields
content: VideoNoteInformation about the video message
Contact
Fields
content: ContactInformation about the shared contact
Location
Fields
content: LocationInformation about the shared location
Venue
Fields
content: VenueInformation about the venue
Poll
Fields
content: PollInformation about the native poll
Dice
Fields
content: Dicea dice with a random value from 1 to 6
NewChatMembers
Fields
LeftChatMember
Fields
content: UserA member was removed from the group, information about them (this member may be the bot itself)
NewChatTitle
Fields
content: StringA chat title was changed to this value
NewChatPhoto
MessageAutoDeleteTimerChanged
Fields
content: MessageAutoDeleteTimerChangedService message: auto-delete timer settings changed in the chat
MigrateToChatID
Fields
content: i64The group has been migrated to a supergroup with the specified identifier.
MigrateFromChatID
Fields
content: i64The supergroup has been migrated from a group with the specified identifier.
PinnedMessage
Fields
Invoice
SuccessfulPayment
Fields
content: SuccessfulPaymentMessage is a service message about a successful payment, information about the payment.
ProximityAlertTriggered
Fields
content: ProximityAlertTriggeredService message. A user in the chat triggered another user’s proximity alert while sharing Live Location.
VoiceChatScheduled
Fields
content: VoiceChatScheduledService message: voice chat scheduled
VoiceChatStarted
Fields
content: VoiceChatStartedService message: voice chat started
VoiceChatEnded
Fields
content: VoiceChatEndedService message: voice chat ended
VoiceChatParticipantsInvited
Fields
content: VoiceChatParticipantsInvitedService 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
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for MessageContent
impl Send for MessageContent
impl Sync for MessageContent
impl Unpin for MessageContent
impl UnwindSafe for MessageContent
Blanket Implementations
Mutably borrows from an owned value. Read more
Wrap the input message T in a tonic::Request
pub fn vzip(self) -> V
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