Struct apid_telegram_bot::Message
source · [−]pub struct Message {Show 21 fields
pub message_id: i32,
pub from: Option<User>,
pub sender_chat: Option<Chat>,
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_sender_name: Option<String>,
pub forward_date: Option<i32>,
pub is_automatic_forward: bool,
pub reply_to_message: Option<Box<Message>>,
pub via_bot: Option<User>,
pub edit_date: Option<i32>,
pub has_protected_content: bool,
pub media_group_id: Option<String>,
pub author_signature: Option<String>,
pub content: MessageContent,
pub web_app_data: Option<WebAppData>,
pub reply_markup: Option<InlineKeyboardMarkup>,
}Expand description
This object represents a message.
Fields
message_id: i32Unique message identifier inside this chat
from: Option<User>Sender of the message; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.
sender_chat: Option<Chat>Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field from contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.
date: i32Date the message was sent in Unix time
chat: ChatConversation the message belongs to
forward_from: Option<User>For forwarded messages, sender of the original message
forward_from_chat: Option<Chat>For messages forwarded from channels or from anonymous administrators, information about the original sender chat
forward_from_message_id: Option<i32>For messages forwarded from channels, identifier of the original message in the channel
forward_signature: Option<String>For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present
forward_sender_name: Option<String>Sender’s name for messages forwarded from users who disallow adding a link to their account in forwarded messages
forward_date: Option<i32>For forwarded messages, date the original message was sent in Unix time
is_automatic_forward: boolTrue, if the message is a channel post that was automatically forwarded to the connected discussion group
reply_to_message: Option<Box<Message>>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.
via_bot: Option<User>Bot through which the message was sent
edit_date: Option<i32>Date the message was last edited in Unix time
has_protected_content: boolTrue, if the message can’t be forwarded
media_group_id: Option<String>The unique identifier of a media message group this message belongs to
Signature of the post author for messages in channels, or the custom title of an anonymous group administrator
content: MessageContentThe content of the message
web_app_data: Option<WebAppData>Service message: data sent by a Web App
reply_markup: Option<InlineKeyboardMarkup>Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Message
impl<'de> Deserialize<'de> for Message
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more