[−][src]Struct tg_bot_models::Message
This object represents a message.
Fields
message_id: i64
Unique message identifier inside this chat
from: Option<User>
Optional. Sender, empty for messages sent to channels
date: i64
Date the message was sent in Unix time
chat: Chat
Conversation the message belongs to
forward_from: Option<User>
Optional. For forwarded messages, sender of the original message
forward_from_chat: Option<Chat>
Optional. For messages forwarded from channels, information about the original channel
forward_from_message_id: Option<i64>
Optional. For messages forwarded from channels, identifier of the original message in the channel
forward_signature: Option<String>
Optional. For messages forwarded from channels, signature of the post author if present
forward_sender_name: Option<String>
Optional. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages
forward_date: Option<i64>
Optional. For forwarded messages, date the original message was sent in Unix time
reply_to_message: Option<Box<Message>>
Optional. For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.
edit_date: Option<i64>
Optional. Date the message was last edited in Unix time
media_group_id: Option<String>
Optional. The unique identifier of a media message group this message belongs to
Optional. Signature of the post author for messages in channels
text: Option<String>
Optional. For text messages, the actual UTF-8 text of the message, 0-4096 characters.
entities: Option<Vec<MessageEntity>>
Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text
Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption
audio: Option<Audio>
Optional. Message is an audio file, information about the file
document: Option<Document>
Optional. Message is a general file, information about the file
animation: Option<Animation>
Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set
game: Option<Game>
Optional. Message is a game, information about the game. More about games »
photo: Option<Vec<PhotoSize>>
Optional. Message is a photo, available sizes of the photo
sticker: Option<Sticker>
Optional. Message is a sticker, information about the sticker
video: Option<Video>
Optional. Message is a video, information about the video
voice: Option<Voice>
Optional. Message is a voice message, information about the file
video_note: Option<VideoNote>
Optional. Message is a video note, information about the video message
Optional. Caption for the animation, audio, document, photo, video or voice, 0-1024 characters
contact: Option<Contact>
Optional. Message is a shared contact, information about the contact
location: Option<Location>
Optional. Message is a shared location, information about the location
venue: Option<Venue>
Optional. Message is a venue, information about the venue
poll: Option<Poll>
Optional. Message is a native poll, information about the poll
new_chat_members: Option<Vec<User>>
Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)
left_chat_member: Option<User>
Optional. A member was removed from the group, information about them (this member may be the bot itself)
new_chat_title: Option<String>
Optional. A chat title was changed to this value
new_chat_photo: Option<Vec<PhotoSize>>
Optional. A chat photo was change to this value
delete_chat_photo: Option<bool>
Optional. Service message: the chat photo was deleted
group_chat_created: Option<bool>
Optional. Service message: the group has been created
supergroup_chat_created: Option<bool>
Optional. 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.
channel_chat_created: Option<bool>
Optional. 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.
migrate_to_chat_id: Option<i64>
Optional. The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
migrate_from_chat_id: Option<i64>
Optional. The supergroup has been migrated from a group with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
pinned_message: Option<Box<Message>>
Optional. 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: Option<Invoice>
Optional. Message is an invoice for a payment, information about the invoice. More about payments »
successful_payment: Option<SuccessfulPayment>
Optional. Message is a service message about a successful payment, information about the payment. More about payments »
connected_website: Option<String>
Optional. The domain name of the website on which the user has logged in. More about Telegram Login »
passport_data: Option<PassportData>
Optional. Telegram Passport data
reply_markup: Option<InlineKeyboardMarkup>
Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.
Trait Implementations
impl PartialEq<Message> for Message
[src]
impl Clone for Message
[src]
fn clone(&self) -> Message
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialOrd<Message> for Message
[src]
fn partial_cmp(&self, other: &Message) -> Option<Ordering>
[src]
fn lt(&self, other: &Message) -> bool
[src]
fn le(&self, other: &Message) -> bool
[src]
fn gt(&self, other: &Message) -> bool
[src]
fn ge(&self, other: &Message) -> bool
[src]
impl Debug for Message
[src]
impl Serialize for Message
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Message
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,