pub struct Message {Show 38 fields
pub id: i64,
pub sender_id: MessageSender,
pub chat_id: i64,
pub sending_state: Option<MessageSendingState>,
pub scheduling_state: Option<MessageSchedulingState>,
pub is_outgoing: bool,
pub is_pinned: bool,
pub can_be_edited: bool,
pub can_be_forwarded: bool,
pub can_be_saved: bool,
pub can_be_deleted_only_for_self: bool,
pub can_be_deleted_for_all_users: bool,
pub can_get_added_reactions: bool,
pub can_get_statistics: bool,
pub can_get_message_thread: bool,
pub can_get_viewers: bool,
pub can_get_media_timestamp_links: bool,
pub can_report_reactions: bool,
pub has_timestamped_media: bool,
pub is_channel_post: bool,
pub is_topic_message: bool,
pub contains_unread_mention: bool,
pub date: i32,
pub edit_date: i32,
pub forward_info: Option<MessageForwardInfo>,
pub interaction_info: Option<MessageInteractionInfo>,
pub unread_reactions: Vec<UnreadReaction>,
pub reply_to: Option<MessageReplyTo>,
pub message_thread_id: i64,
pub self_destruct_type: Option<MessageSelfDestructType>,
pub self_destruct_in: f64,
pub auto_delete_in: f64,
pub via_bot_user_id: i64,
pub author_signature: String,
pub media_album_id: i64,
pub restriction_reason: String,
pub content: MessageContent,
pub reply_markup: Option<ReplyMarkup>,
}
Expand description
Describes a message
Fields§
§id: i64
Message identifier; unique for the chat to which the message belongs
sender_id: MessageSender
Identifier of the sender of the message
chat_id: i64
Chat identifier
sending_state: Option<MessageSendingState>
The sending state of the message; may be null if the message isn’t being sent and didn’t fail to be sent
scheduling_state: Option<MessageSchedulingState>
The scheduling state of the message; may be null if the message isn’t scheduled
is_outgoing: bool
True, if the message is outgoing
is_pinned: bool
True, if the message is pinned
can_be_edited: bool
True, if the message can be edited. For live location and poll messages this fields shows whether editMessageLiveLocation or stopPoll can be used with this message by the application
can_be_forwarded: bool
True, if the message can be forwarded
can_be_saved: bool
True, if content of the message can be saved locally or copied
can_be_deleted_only_for_self: bool
True, if the message can be deleted only for the current user while other users will continue to see it
can_be_deleted_for_all_users: bool
True, if the message can be deleted for all users
can_get_added_reactions: bool
True, if the list of added reactions is available through getMessageAddedReactions
can_get_statistics: bool
True, if the message statistics are available through getMessageStatistics
can_get_message_thread: bool
True, if information about the message thread is available through getMessageThread and getMessageThreadHistory
can_get_viewers: bool
True, if chat members already viewed the message can be received through getMessageViewers
can_get_media_timestamp_links: bool
True, if media timestamp links can be generated for media timestamp entities in the message text, caption or web page description through getMessageLink
can_report_reactions: bool
True, if reactions on the message can be reported through reportMessageReactions
has_timestamped_media: bool
True, if media timestamp entities refers to a media in this message as opposed to a media in the replied message
is_channel_post: bool
True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts
is_topic_message: bool
True, if the message is a forum topic message
contains_unread_mention: bool
True, if the message contains an unread mention for the current user
date: i32
Point in time (Unix timestamp) when the message was sent
edit_date: i32
Point in time (Unix timestamp) when the message was last edited
forward_info: Option<MessageForwardInfo>
Information about the initial message sender; may be null if none or unknown
interaction_info: Option<MessageInteractionInfo>
Information about interactions with the message; may be null if none
unread_reactions: Vec<UnreadReaction>
Information about unread reactions added to the message
reply_to: Option<MessageReplyTo>
Information about the message or the story this message is replying to; may be null if none
message_thread_id: i64
If non-zero, the identifier of the message thread the message belongs to; unique within the chat to which the message belongs
self_destruct_type: Option<MessageSelfDestructType>
The message’s self-destruct type; may be null if none
self_destruct_in: f64
Time left before the message self-destruct timer expires, in seconds; 0 if self-desctruction isn’t scheduled yet
auto_delete_in: f64
Time left before the message will be automatically deleted by message_auto_delete_time setting of the chat, in seconds; 0 if never
via_bot_user_id: i64
If non-zero, the user identifier of the bot through which this message was sent
For channel posts and anonymous group messages, optional author signature
media_album_id: i64
Unique identifier of an album this message belongs to. Only audios, documents, photos and videos can be grouped together in albums
restriction_reason: String
If non-empty, contains a human-readable description of the reason why access to this message must be restricted
content: MessageContent
Content of the message
reply_markup: Option<ReplyMarkup>
Reply markup for the message; may be null if none