add Message struct

This commit is contained in:
fedechkin_alexey 2019-09-02 11:21:55 +07:00
parent 2567ae1825
commit 8ba3362eba

View file

@ -25,4 +25,55 @@ pub struct Chat {
permissions: Option<ChatPermissions>, permissions: Option<ChatPermissions>,
sticker_set_name: Option<String>, sticker_set_name: Option<String>,
can_set_sticker_set: Option<Bool>, can_set_sticker_set: Option<Bool>,
}
#[derive(Debug, Deserialize)]
pub struct Message {
message_id: i64,
from: Option<User>,
date: i64,
chat: Chat,
forward_from: Option<User>,
forward_from_chat: Option<Chat>,
forward_from_message_id: Option<i64>,
forward_signature: Option<String>,
forward_sender_name: Option<String>,
forward_date: Option<i64>,
reply_to_message: Option<Message>,
edit_date: Option<i64>,
media_group_id: Option<String>,
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<Stickers>,
video: Option<Video>,
voice: Option<Voice>,
video_note: Option< VideoNote>,
caption: Option<String>,
contact: Option<Contact>,
location: Option<Location>,
venue: Option<Venue>,
poll: Option<Poll>,
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: Optional<Message>,
invoice: Option<Invoice>,
successful_payment: Optiona<SuccessfulPayment>,
connected_website: Option<String>,
passport_data: Option<PassportData>,
reply_markup: Option<InlineKeyboardMarkup>,
} }