pub struct Message {Show 37 fields
pub chat: Chat,
pub date: Integer,
pub edit_date: Option<Integer>,
pub has_protected_content: bool,
pub id: Integer,
pub is_automatic_forward: bool,
pub sender: MessageSender,
pub author_signature: Option<String>,
pub business_connection_id: Option<String>,
pub direct_messages_topic: Option<DirectMessagesTopic>,
pub effect_id: Option<String>,
pub ephemeral_message_id: Option<Integer>,
pub external_reply: Option<ExternalReplyInfo>,
pub forward_origin: Option<MessageOrigin>,
pub guest_bot: Option<MessageGuestBot>,
pub guest_query_id: Option<String>,
pub has_media_spoiler: Option<bool>,
pub is_from_offline: Option<bool>,
pub is_paid_post: Option<bool>,
pub is_topic_message: Option<bool>,
pub link_preview_options: Option<LinkPreviewOptions>,
pub media_group_id: Option<String>,
pub message_thread_id: Option<Integer>,
pub paid_star_count: Option<Integer>,
pub quote: Option<TextQuote>,
pub receiver_user: Option<User>,
pub reply_markup: Option<InlineKeyboardMarkup>,
pub reply_to: Option<ReplyTo>,
pub reply_to_checklist_task_id: Option<Integer>,
pub reply_to_poll_option_id: Option<String>,
pub sender_boost_count: Option<Integer>,
pub sender_business_bot: Option<User>,
pub sender_tag: Option<String>,
pub show_caption_above_media: Option<bool>,
pub suggested_post_info: Option<SuggestedPostInfo>,
pub via_bot: Option<User>,
pub data: MessageData,
}Expand description
Represents a message.
Fields§
§chat: ChatChat the message belongs to.
date: IntegerDate the message was sent in Unix time.
edit_date: Option<Integer>Date the message was last edited in Unix time.
has_protected_content: boolIndicates whether the message can’t be forwarded.
id: IntegerUnique message identifier inside the chat.
is_automatic_forward: boolIndicates whether the message is a channel post that was automatically forwarded to the connected discussion group.
sender: MessageSenderSender of the message.
Author signature.
business_connection_id: Option<String>Unique identifier of the business connection from which the message was received.
If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier.
direct_messages_topic: Option<DirectMessagesTopic>Information about the direct messages chat topic that contains the message.
effect_id: Option<String>Unique identifier of the message effect added to the message.
ephemeral_message_id: Option<Integer>The identifier may be reused for another ephemeral message after the message is deleted or expires.
external_reply: Option<ExternalReplyInfo>Information about the message that is being replied to, which may come from another chat or forum topic.
forward_origin: Option<MessageOrigin>Information about the original message for forwarded messages.
guest_bot: Option<MessageGuestBot>For a message sent by a guest bot, this is the information about the user and chat.
guest_query_id: Option<String>The unique identifier for the guest query.
Use this identifier with the method crate::types::AnswerGuestQuery
to send a response message.
If non-empty, the message belongs to the chat where the guest bot was summoned, which may not coincide with other existing bot chats sharing the same identifier.
has_media_spoiler: Option<bool>Indicates whether the message media is covered by a spoiler animation.
is_from_offline: Option<bool>Whether the message was sent by an implicit action.
For example, as an away or a greeting business message, or as a scheduled message.
is_paid_post: Option<bool>Whether the message is a paid post.
Note that such posts must not be deleted for 24 hours to receive the payment and can’t be edited.
is_topic_message: Option<bool>Indicates whether the message is sent to a topic in a forum supergroup or a private chat with the bot.
link_preview_options: Option<LinkPreviewOptions>Options used for link preview generation for the message, if it is a text message and link preview options were changed.
media_group_id: Option<String>Unique identifier of a media message group this message belongs to.
message_thread_id: Option<Integer>Unique identifier of a message thread to which the message belongs; for supergroups and private chats only.
paid_star_count: Option<Integer>The number of Telegram Stars that were paid by the sender of the message to send it.
quote: Option<TextQuote>For replies that quote part of the original message, the quoted part of the message.
receiver_user: Option<User>For ephemeral messages, the use who received the message.
reply_markup: Option<InlineKeyboardMarkup>Inline keyboard attached to the message.
reply_to: Option<ReplyTo>For replies, the original message or story.
reply_to_checklist_task_id: Option<Integer>Identifier of the specific checklist task that is being replied to.
reply_to_poll_option_id: Option<String>Persistent identifier of the specific poll option that is being replied to.
sender_boost_count: Option<Integer>Number of boosts added by the user.
Contains a value only if the sender of the message boosted the chat.
sender_business_bot: Option<User>The bot that actually sent the message on behalf of the business account.
Available only for outgoing messages sent on behalf of the connected business account.
sender_tag: Option<String>Tag or custom title of the sender of the message; for supergroups only.
show_caption_above_media: Option<bool>Whether the caption must be shown above the message media.
suggested_post_info: Option<SuggestedPostInfo>Information about suggested post parameters if the message is a suggested post in a channel direct messages chat.
If the message is an approved or declined suggested post, then it can’t be edited.
via_bot: Option<User>Bot through which the message was sent.
data: MessageDataContains message data.