Enum telegram_bot2::models::InlineQueryResult
source · pub enum InlineQueryResult {
Show 20 variants
Article {
id: String,
title: String,
input_message_content: InputMessageContent,
reply_markup: Option<InlineKeyboardMarkup>,
url: Option<String>,
hide_url: Option<bool>,
description: Option<String>,
thumb_url: Option<String>,
thumb_width: Option<i64>,
thumb_height: Option<i64>,
},
CachedPhoto {
id: String,
photo_url: String,
thumb_url: String,
photo_width: Option<i64>,
photo_height: Option<i64>,
title: Option<String>,
description: Option<String>,
caption: Option<String>,
parse_mode: Option<String>,
caption_entities: Vec<MessageEntity>,
reply_markup: Option<InlineKeyboardMarkup>,
input_message_content: Option<InputMessageContent>,
},
CachedGif {Show 13 fields
id: String,
gif_url: String,
gif_width: Option<i64>,
gif_height: Option<i64>,
gif_duration: Option<i64>,
thumb_url: String,
thumb_mime_type: Option<String>,
title: Option<String>,
caption: Option<String>,
parse_mode: Option<String>,
caption_entities: Vec<MessageEntity>,
reply_markup: Option<InlineKeyboardMarkup>,
input_message_content: Option<InputMessageContent>,
},
CachedMpeg4Gif {Show 13 fields
id: String,
mpeg4_url: String,
mpeg4_width: Option<i64>,
mpeg4_height: Option<i64>,
mpeg4_duration: Option<i64>,
thumb_url: String,
thumb_mime_type: Option<String>,
title: Option<String>,
caption: Option<String>,
parse_mode: Option<String>,
caption_entities: Vec<MessageEntity>,
reply_markup: Option<InlineKeyboardMarkup>,
input_message_content: Option<InputMessageContent>,
},
CachedVideo {Show 14 fields
id: String,
video_url: String,
mime_type: String,
thumb_url: String,
title: String,
caption: Option<String>,
parse_mode: Option<String>,
caption_entities: Vec<MessageEntity>,
video_width: Option<i64>,
video_height: Option<i64>,
video_duration: Option<i64>,
description: Option<String>,
reply_markup: Option<InlineKeyboardMarkup>,
input_message_content: Option<InputMessageContent>,
},
CachedAudio {
id: String,
audio_url: String,
title: String,
caption: Option<String>,
parse_mode: Option<String>,
caption_entities: Vec<MessageEntity>,
performer: Option<String>,
audio_duration: Option<i64>,
reply_markup: Option<InlineKeyboardMarkup>,
input_message_content: Option<InputMessageContent>,
},
CachedVoice {
id: String,
voice_url: String,
title: String,
caption: Option<String>,
parse_mode: Option<String>,
caption_entities: Vec<MessageEntity>,
voice_duration: Option<i64>,
reply_markup: Option<InlineKeyboardMarkup>,
input_message_content: Option<InputMessageContent>,
},
CachedDocument {Show 13 fields
id: String,
title: String,
caption: Option<String>,
parse_mode: Option<String>,
caption_entities: Vec<MessageEntity>,
document_url: String,
mime_type: String,
description: Option<String>,
reply_markup: Option<InlineKeyboardMarkup>,
input_message_content: Option<InputMessageContent>,
thumb_url: Option<String>,
thumb_width: Option<i64>,
thumb_height: Option<i64>,
},
Location {Show 13 fields
id: String,
latitude: f32,
longitude: f32,
title: String,
horizontal_accuracy: Option<f32>,
live_period: Option<i64>,
heading: Option<i64>,
proximity_alert_radius: Option<i64>,
reply_markup: Option<InlineKeyboardMarkup>,
input_message_content: Option<InputMessageContent>,
thumb_url: Option<String>,
thumb_width: Option<i64>,
thumb_height: Option<i64>,
},
Venue {Show 14 fields
id: String,
latitude: f32,
longitude: f32,
title: String,
address: String,
foursquare_id: Option<String>,
foursquare_type: Option<String>,
google_place_id: Option<String>,
google_place_type: Option<String>,
reply_markup: Option<InlineKeyboardMarkup>,
input_message_content: Option<InputMessageContent>,
thumb_url: Option<String>,
thumb_width: Option<i64>,
thumb_height: Option<i64>,
},
Contact {
id: String,
phone_number: String,
first_name: String,
last_name: Option<String>,
vcard: Option<String>,
reply_markup: Option<InlineKeyboardMarkup>,
input_message_content: Option<InputMessageContent>,
thumb_url: Option<String>,
thumb_width: Option<i64>,
thumb_height: Option<i64>,
},
Game {
id: String,
game_short_name: String,
reply_markup: Option<InlineKeyboardMarkup>,
},
Photo {
id: String,
photo_file_id: String,
title: Option<String>,
description: Option<String>,
caption: Option<String>,
parse_mode: Option<String>,
caption_entities: Vec<MessageEntity>,
reply_markup: Option<InlineKeyboardMarkup>,
input_message_content: Option<InputMessageContent>,
},
Gif {
id: String,
gif_file_id: String,
title: Option<String>,
caption: Option<String>,
parse_mode: Option<String>,
caption_entities: Vec<MessageEntity>,
reply_markup: Option<InlineKeyboardMarkup>,
input_message_content: Option<InputMessageContent>,
},
Mpeg4Gif {
id: String,
mpeg4_file_id: String,
title: Option<String>,
caption: Option<String>,
parse_mode: Option<String>,
caption_entities: Vec<MessageEntity>,
reply_markup: Option<InlineKeyboardMarkup>,
input_message_content: Option<InputMessageContent>,
},
Sticker {
id: String,
sticker_file_id: String,
reply_markup: Option<InlineKeyboardMarkup>,
input_message_content: Option<InputMessageContent>,
},
Document {
id: String,
title: String,
document_file_id: String,
description: Option<String>,
caption: Option<String>,
parse_mode: Option<String>,
caption_entities: Vec<MessageEntity>,
reply_markup: Option<InlineKeyboardMarkup>,
input_message_content: Option<InputMessageContent>,
},
Video {
id: String,
video_file_id: String,
title: String,
description: Option<String>,
caption: Option<String>,
parse_mode: Option<String>,
caption_entities: Vec<MessageEntity>,
reply_markup: Option<InlineKeyboardMarkup>,
input_message_content: Option<InputMessageContent>,
},
Voice {
id: String,
voice_file_id: String,
title: String,
caption: Option<String>,
parse_mode: Option<String>,
caption_entities: Vec<MessageEntity>,
reply_markup: Option<InlineKeyboardMarkup>,
input_message_content: Option<InputMessageContent>,
},
Audio {
id: String,
audio_file_id: String,
caption: Option<String>,
parse_mode: Option<String>,
caption_entities: Vec<MessageEntity>,
reply_markup: Option<InlineKeyboardMarkup>,
input_message_content: Option<InputMessageContent>,
},
}Expand description
This object represents one result of an inline query. Telegram clients currently support results of the following 20 types:
Variants§
Article
Fields
input_message_content: InputMessageContentContent of the message to be sent
Represents a link to an article or web page.
CachedPhoto
Fields
photo_url: StringA valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB
parse_mode: Option<String>Mode for parsing entities in the photo caption. See formatting options for more details.
caption_entities: Vec<MessageEntity>List of special entities that appear in the caption, which can be specified instead of parse_mode
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the photo
Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.
CachedGif
Fields
thumb_mime_type: Option<String>MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”
caption: Option<String>Caption of the GIF file to be sent, 0-1024 characters after entities parsing
parse_mode: Option<String>Mode for parsing entities in the caption. See formatting options for more details.
caption_entities: Vec<MessageEntity>List of special entities that appear in the caption, which can be specified instead of parse_mode
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the GIF animation
Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.
CachedMpeg4Gif
Fields
thumb_mime_type: Option<String>MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”
caption: Option<String>Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing
parse_mode: Option<String>Mode for parsing entities in the caption. See formatting options for more details.
caption_entities: Vec<MessageEntity>List of special entities that appear in the caption, which can be specified instead of parse_mode
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the video animation
Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.
CachedVideo
Fields
parse_mode: Option<String>Mode for parsing entities in the video caption. See formatting options for more details.
caption_entities: Vec<MessageEntity>List of special entities that appear in the caption, which can be specified instead of parse_mode
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).
Represents a link to a page containing an embedded video player or a video file. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video. If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you must replace its content using input_message_content.
CachedAudio
Fields
parse_mode: Option<String>Mode for parsing entities in the audio caption. See formatting options for more details.
caption_entities: Vec<MessageEntity>List of special entities that appear in the caption, which can be specified instead of parse_mode
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the audio
Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio. Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
CachedVoice
Fields
parse_mode: Option<String>Mode for parsing entities in the voice message caption. See formatting options for more details.
caption_entities: Vec<MessageEntity>List of special entities that appear in the caption, which can be specified instead of parse_mode
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the voice recording
Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the the voice message. Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
CachedDocument
Fields
caption: Option<String>Caption of the document to be sent, 0-1024 characters after entities parsing
parse_mode: Option<String>Mode for parsing entities in the document caption. See formatting options for more details.
caption_entities: Vec<MessageEntity>List of special entities that appear in the caption, which can be specified instead of parse_mode
mime_type: StringMIME type of the content of the file, either “application/pdf” or “application/zip”
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the file
Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file. Currently, only .PDF and .ZIP files can be sent using this method. Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
Location
Fields
horizontal_accuracy: Option<f32>The radius of uncertainty for the location, measured in meters; 0-1500
live_period: Option<i64>Period in seconds for which the location can be updated, should be between 60 and 86400.
heading: Option<i64>For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
proximity_alert_radius: Option<i64>For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the location
Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the location. Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
Venue
Fields
foursquare_type: Option<String>Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the venue
Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the venue. Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
Contact
Fields
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the contact
Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the contact. Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
Game
Fields
Represents a Game. Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
Photo
Fields
parse_mode: Option<String>Mode for parsing entities in the photo caption. See formatting options for more details.
caption_entities: Vec<MessageEntity>List of special entities that appear in the caption, which can be specified instead of parse_mode
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the photo
Represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.
Gif
Fields
caption: Option<String>Caption of the GIF file to be sent, 0-1024 characters after entities parsing
parse_mode: Option<String>Mode for parsing entities in the caption. See formatting options for more details.
caption_entities: Vec<MessageEntity>List of special entities that appear in the caption, which can be specified instead of parse_mode
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the GIF animation
Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with specified content instead of the animation.
Mpeg4Gif
Fields
caption: Option<String>Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing
parse_mode: Option<String>Mode for parsing entities in the caption. See formatting options for more details.
caption_entities: Vec<MessageEntity>List of special entities that appear in the caption, which can be specified instead of parse_mode
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the video animation
Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.
Sticker
Fields
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the sticker
Represents a link to a sticker stored on the Telegram servers. By default, this sticker will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the sticker. Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
Document
Fields
caption: Option<String>Caption of the document to be sent, 0-1024 characters after entities parsing
parse_mode: Option<String>Mode for parsing entities in the document caption. See formatting options for more details.
caption_entities: Vec<MessageEntity>List of special entities that appear in the caption, which can be specified instead of parse_mode
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the file
Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file. Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
Video
Fields
parse_mode: Option<String>Mode for parsing entities in the video caption. See formatting options for more details.
caption_entities: Vec<MessageEntity>List of special entities that appear in the caption, which can be specified instead of parse_mode
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the video
Represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video.
Voice
Fields
parse_mode: Option<String>Mode for parsing entities in the voice message caption. See formatting options for more details.
caption_entities: Vec<MessageEntity>List of special entities that appear in the caption, which can be specified instead of parse_mode
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the voice message
Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the voice message. Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
Audio
Fields
parse_mode: Option<String>Mode for parsing entities in the audio caption. See formatting options for more details.
caption_entities: Vec<MessageEntity>List of special entities that appear in the caption, which can be specified instead of parse_mode
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the audio
Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio.
Trait Implementations§
source§impl Clone for InlineQueryResult
impl Clone for InlineQueryResult
source§fn clone(&self) -> InlineQueryResult
fn clone(&self) -> InlineQueryResult
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more