This commit is contained in:
RustemB 2019-09-17 22:15:19 +05:00
parent af62a72afd
commit cc542b6eae
2 changed files with 18 additions and 4 deletions

View file

@ -2,9 +2,14 @@ use crate::core::types::{User, Location};
#[derive(Debug, Serialize, Deserialize, Hash, PartialEq, Eq, Clone)]
pub struct InlineQuery {
pub id: i64,
/// Unique identifier for this query
pub id: String,
/// Sender
pub from: User,
/// Optional. Sender location, only for bots that request user location
pub location: Option<Location>,
/// Text of the query (up to 512 characters)
pub query: String,
/// Offset of the results to be returned, can be controlled by the bot
pub offset: String,
}

View file

@ -2,15 +2,24 @@ use crate::core::types::{InputMessageContent, InlineKeyboardMarkup};
#[derive(Debug, Deserialize, PartialEq, Clone)]
pub struct InlineQueryResultArticle {
pub r#type: String,
/// Unique identifier for this result, 1-64 Bytes
pub id: String,
/// Title of the result
pub title: String,
/// Content of the message to be sent
pub input_message_content: InputMessageContent,
/// Optional. Inline keyboard attached to the message
pub reply_markup: Option<InlineKeyboardMarkup>,
/// Optional. URL of the result
pub url: Option<String>,
/// Optional. Pass True, if you don't want the URL to be shown in the message
pub hide_url: Option<bool>,
/// Optional. Short description of the result
pub description: Option<String>,
/// Optional. Url of the thumbnail for the result
pub thumb_url: Option<String>,
pub thumb_width: Option<u64>,
pub thumb_height: Option<u64>,
/// Optional. Thumbnail width
pub thumb_width: Option<i64>,
/// Optional. Thumbnail height
pub thumb_height: Option<i64>,
}