pub struct Message {Show 39 fields
pub _message_id: i32,
pub _from: Option<User>,
pub _date: i32,
pub _chat: Chat,
pub _forward_from: Option<User>,
pub _forward_from_chat: Option<Chat>,
pub _forward_from_message_id: Option<i32>,
pub _forward_signature: Option<String>,
pub _forward_date: Option<i32>,
pub _reply_to_message: Option<Box<Message>>,
pub _edit_date: Option<i32>,
pub _author_signature: Option<String>,
pub _text: Option<String>,
pub _entities: Option<Vec<MessageEntity>>,
pub _audio: Option<Audio>,
pub _document: Option<Document>,
pub _game: Option<Game>,
pub _photo: Option<Vec<PhotoSize>>,
pub _sticker: Option<Sticker>,
pub _video: Option<Video>,
pub _voice: Option<Voice>,
pub _video_note: Option<VideoNote>,
pub _caption: Option<String>,
pub _contact: Option<Contact>,
pub _location: Option<Location>,
pub _venue: Option<Venue>,
pub _new_chat_members: Option<Vec<User>>,
pub _left_chat_member: Option<User>,
pub _new_chat_title: Option<String>,
pub _new_chat_photo: Option<Vec<PhotoSize>>,
pub _delete_chat_photo: Option<bool>,
pub _group_chat_created: Option<bool>,
pub _supergroup_chat_created: Option<bool>,
pub _channel_chat_created: Option<bool>,
pub _migrate_to_chat_id: Option<i32>,
pub _migrate_from_chat_id: Option<i32>,
pub _pinned_message: Option<Box<Message>>,
pub _invoice: Option<Invoice>,
pub _successful_payment: Option<SuccessfulPayment>,
}Expand description
This object represents a message.
Fields§
§_message_id: i32Unique message identifier inside this chat
_from: Option<User>Optional. Sender, empty for messages sent to channels
_date: i32Date the message was sent in Unix time
_chat: ChatConversation 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<i32>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_date: Option<i32>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<i32>Optional. Date the message was last edited in Unix time
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
_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
_game: Option<Game>Optional. Message is a game, information about the game.
_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
_caption: Option<String>Optional. Caption for the document, photo or video, 0-200 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
_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<i32>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<i32>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