[][src]Struct tg_botapi::types::Message

pub struct Message {
    pub message_id: i64,
    pub from: Option<User>,
    pub date: i64,
    pub chat: Chat,
    pub forward_from: Option<User>,
    pub forward_from_chat: Option<Chat>,
    pub forward_from_message_id: Option<i64>,
    pub forward_signature: Option<String>,
    pub forward_date: Option<i64>,
    pub reply_to_message: Option<Box<Message>>,
    pub edit_date: Option<i64>,
    pub author_signature: Option<String>,
    pub text: Option<String>,
    pub entities: Option<Vec<MessageEntity>>,
    pub caption_entities: Option<Vec<MessageEntity>>,
    pub audio: Option<Audio>,
    pub document: Option<Document>,
    pub animation: Option<Animation>,
    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<i64>,
    pub migrate_from_chat_id: Option<i64>,
    pub pinned_message: Option<Box<Message>>,
    pub invoice: Option<Invoice>,
    pub successful_payment: Option<SuccessfulPayment>,
    pub connected_website: Option<String>,
    pub passport_data: Option<PassportData>,
}

Fields

message_id: i64from: Option<User>date: i64chat: Chatforward_from: Option<User>forward_from_chat: Option<Chat>forward_from_message_id: Option<i64>forward_signature: Option<String>forward_date: Option<i64>reply_to_message: Option<Box<Message>>edit_date: Option<i64>author_signature: Option<String>text: Option<String>entities: Option<Vec<MessageEntity>>caption_entities: Option<Vec<MessageEntity>>audio: Option<Audio>document: Option<Document>animation: Option<Animation>game: Option<Game>photo: Option<Vec<PhotoSize>>sticker: Option<Sticker>video: Option<Video>voice: Option<Voice>video_note: Option<VideoNote>caption: Option<String>contact: Option<Contact>location: Option<Location>venue: Option<Venue>new_chat_members: Option<Vec<User>>left_chat_member: Option<User>new_chat_title: Option<String>new_chat_photo: Option<Vec<PhotoSize>>delete_chat_photo: Option<bool>group_chat_created: Option<bool>supergroup_chat_created: Option<bool>channel_chat_created: Option<bool>migrate_to_chat_id: Option<i64>migrate_from_chat_id: Option<i64>pinned_message: Option<Box<Message>>invoice: Option<Invoice>successful_payment: Option<SuccessfulPayment>connected_website: Option<String>passport_data: Option<PassportData>

Methods

impl Message[src]

pub fn reply(&self, text: impl Into<String>) -> SendMessage[src]

pub fn respond(&self, text: impl Into<String>) -> SendMessage[src]

pub fn reply_photo(&self, photo: InputFile) -> SendPhoto[src]

pub fn respond_photo(&self, photo: InputFile) -> SendPhoto[src]

pub fn get_text(&self) -> Option<&String>[src]

Trait Implementations

impl Clone for Message[src]

impl Debug for Message[src]

impl Serialize for Message[src]

impl<'de> Deserialize<'de> for Message[src]

Auto Trait Implementations

impl Send for Message

impl Sync for Message

impl Unpin for Message

impl UnwindSafe for Message

impl RefUnwindSafe for Message

Blanket Implementations

impl<'a, T> Captures<'a> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]