Enum telbot_types::query::InlineQueryResultKind[][src]

pub enum InlineQueryResultKind {
Show 19 variants Article { title: String, input_message_content: InputMessageContent, url: Option<String>, hide_url: Option<bool>, description: Option<String>, thumb_url: Option<String>, thumb_width: Option<u32>, thumb_height: Option<u32>, }, Photo { photo_url: String, thumb_url: String, photo_width: Option<u32>, photo_height: Option<u32>, title: Option<String>, description: Option<String>, caption: Option<String>, parse_mode: Option<ParseMode>, caption_entities: Option<Vec<MessageEntity>>, input_message_content: Option<InputMessageContent>, }, Gif { gif_url: String, gif_width: Option<u32>, gif_height: Option<u32>, gif_duration: Option<u32>, thumb_url: String, thumb_mime_type: Option<String>, title: Option<String>, caption: Option<String>, parse_mode: Option<ParseMode>, caption_entities: Option<Vec<MessageEntity>>, input_message_content: Option<InputMessageContent>, }, Mpeg4Gif { mpeg4_url: String, mpeg4_width: Option<u32>, mpeg4_height: Option<u32>, mpeg4_duration: Option<u32>, thumb_url: String, thumb_mime_type: Option<String>, title: Option<String>, caption: Option<String>, parse_mode: Option<ParseMode>, caption_entities: Option<Vec<MessageEntity>>, input_message_content: Option<InputMessageContent>, }, Video { video_url: String, mime_type: String, thumb_url: String, title: String, video_width: Option<u32>, video_height: Option<u32>, video_duration: Option<u32>, description: Option<String>, caption: Option<String>, parse_mode: Option<ParseMode>, caption_entities: Option<Vec<MessageEntity>>, input_message_content: Option<InputMessageContent>, }, Audio { audio_url: String, title: String, performer: Option<String>, audio_duration: Option<u32>, caption: Option<String>, parse_mode: Option<ParseMode>, caption_entities: Option<Vec<MessageEntity>>, input_message_content: Option<InputMessageContent>, }, Voice { voice_url: String, title: String, voice_duration: Option<u32>, caption: Option<String>, parse_mode: Option<ParseMode>, caption_entities: Option<Vec<MessageEntity>>, input_message_content: Option<InputMessageContent>, }, Document { document_url: String, mime_type: String, description: String, thumb_url: Option<String>, thumb_width: Option<u32>, thumb_height: Option<u32>, caption: Option<String>, parse_mode: Option<ParseMode>, caption_entities: Option<Vec<MessageEntity>>, input_message_content: Option<InputMessageContent>, }, Location { latitude: f32, longitude: f32, title: String, horizontal_accuracy: f32, live_period: Option<u32>, heading: Option<u32>, proximity_alert_radius: Option<u32>, thumb_url: Option<String>, thumb_width: Option<u32>, thumb_height: Option<u32>, input_message_content: Option<InputMessageContent>, }, Venue { 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>, thumb_url: Option<String>, thumb_width: Option<u32>, thumb_height: Option<u32>, input_message_content: Option<InputMessageContent>, }, Contact { phone_number: String, first_name: String, last_name: Option<String>, vcard: Option<String>, thumb_url: Option<String>, thumb_width: Option<u32>, thumb_height: Option<u32>, input_message_content: Option<InputMessageContent>, }, Game { game_short_name: String, }, CachedPhoto { photo_file_id: String, title: String, description: Option<String>, caption: Option<String>, parse_mode: Option<ParseMode>, caption_entities: Option<Vec<MessageEntity>>, input_message_content: Option<InputMessageContent>, }, CachedGif { gif_file_id: String, title: String, caption: Option<String>, parse_mode: Option<ParseMode>, caption_entities: Option<Vec<MessageEntity>>, input_message_content: Option<InputMessageContent>, }, CachedMpeg4Gif { mpeg4_file_id: String, title: String, caption: Option<String>, parse_mode: Option<ParseMode>, caption_entities: Option<Vec<MessageEntity>>, input_message_content: Option<InputMessageContent>, }, CachedVideo { video_file_id: String, title: String, description: Option<String>, caption: Option<String>, parse_mode: Option<ParseMode>, caption_entities: Option<Vec<MessageEntity>>, input_message_content: Option<InputMessageContent>, }, CachedAudio { audio_file_id: String, caption: Option<String>, parse_mode: Option<ParseMode>, caption_entities: Option<Vec<MessageEntity>>, input_message_content: Option<InputMessageContent>, }, CachedVoice { voice_file_id: String, title: String, caption: Option<String>, parse_mode: Option<ParseMode>, caption_entities: Option<Vec<MessageEntity>>, input_message_content: Option<InputMessageContent>, }, CachedDocument { document_file_id: String, title: String, description: String, caption: Option<String>, parse_mode: Option<ParseMode>, caption_entities: Option<Vec<MessageEntity>>, input_message_content: Option<InputMessageContent>, },
}
Expand description

Inline query result type

Variants

Article

Represents a link to an article or web page.

Fields of Article

title: String

Title of the result

input_message_content: InputMessageContent

Content of the message to be sent

url: Option<String>

URL of the result

hide_url: Option<bool>

Pass True, if you don’t want the URL to be shown in the message

description: Option<String>

Short description of the result

thumb_url: Option<String>

Url of the thumbnail for the result

thumb_width: Option<u32>

Thumbnail width

thumb_height: Option<u32>

Thumbnail height

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.

Fields of Photo

photo_url: String

A valid URL of the photo. Photo must be in jpeg format.

Photo size must not exceed 5MB

thumb_url: String

URL of the thumbnail for the photo

photo_width: Option<u32>

Width of the photo

photo_height: Option<u32>

Height of the photo

title: Option<String>

Title for the result

description: Option<String>

Short description of the result

caption: Option<String>

Caption of the photo to be sent, 0-1024 characters after entities parsing

parse_mode: Option<ParseMode>

Mode for parsing entities in the photo caption. See formatting options for more details.

caption_entities: Option<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

Gif

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.

Fields of Gif

gif_url: String

A valid URL for the GIF file. File size must not exceed 1MB

gif_width: Option<u32>

Width of the GIF

gif_height: Option<u32>

Height of the GIF

gif_duration: Option<u32>

Duration of the GIF

thumb_url: String

URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result

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”

title: Option<String>

Title for the result

caption: Option<String>

Caption of the GIF file to be sent, 0-1024 characters after entities parsing

parse_mode: Option<ParseMode>

Mode for parsing entities in the caption. See formatting options for more details.

caption_entities: Option<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

Mpeg4Gif

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.

Fields of Mpeg4Gif

mpeg4_url: String

A valid URL for the MP4 file. File size must not exceed 1MB

mpeg4_width: Option<u32>

Video width

mpeg4_height: Option<u32>

Video height

mpeg4_duration: Option<u32>

Video duration

thumb_url: String

URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result

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”

title: Option<String>

Title for the result

caption: Option<String>

Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing

parse_mode: Option<ParseMode>

Mode for parsing entities in the caption. See formatting options for more details.

caption_entities: Option<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

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.

Fields of Video

video_url: String

A valid URL for the embedded video player or video file

mime_type: String

Mime type of the content of video url, “text/html” or “video/mp4”

thumb_url: String

URL of the thumbnail (jpeg only) for the video

title: String

Title for the result

video_width: Option<u32>

Video width

video_height: Option<u32>

Video height

video_duration: Option<u32>

Video duration in seconds

description: Option<String>

Short description of the result

caption: Option<String>

Caption of the video to be sent, 0-1024 characters after entities parsing

parse_mode: Option<ParseMode>

Mode for parsing entities in the caption. See formatting options for more details.

caption_entities: Option<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).

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.

Fields of Audio

audio_url: String

A valid URL for the audio file

title: String

Title

performer: Option<String>

Performer

audio_duration: Option<u32>

Audio duration in seconds

caption: Option<String>

Caption, 0-1024 characters after entities parsing

parse_mode: Option<ParseMode>

Mode for parsing entities in the caption. See formatting options for more details.

caption_entities: Option<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

Voice

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.

Fields of Voice

voice_url: String

A valid URL for the voice recording

title: String

Recording title

voice_duration: Option<u32>

Recording duration in seconds

caption: Option<String>

Caption, 0-1024 characters after entities parsing

parse_mode: Option<ParseMode>

Mode for parsing entities in the caption. See formatting options for more details.

caption_entities: Option<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

Document

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.

Fields of Document

document_url: String

A valid URL for the file

mime_type: String

Mime type of the content of the file, either “application/pdf” or “application/zip”

description: String

Short description of the result

thumb_url: Option<String>

URL of the thumbnail (jpeg only) for the file

thumb_width: Option<u32>

Thumbnail width

thumb_height: Option<u32>

Thumbnail height

caption: Option<String>

Caption of the document to be sent, 0-1024 characters after entities parsing

parse_mode: Option<ParseMode>

Mode for parsing entities in the caption. See formatting options for more details.

caption_entities: Option<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

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.

Fields of Location

latitude: f32

Location latitude in degrees

longitude: f32

Location longitude in degrees

title: String

Location title

horizontal_accuracy: f32

The radius of uncertainty for the location, measured in meters; 0-1500

live_period: Option<u32>

Period in seconds for which the location can be updated, should be between 60 and 86400.

heading: Option<u32>

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<u32>

For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.

thumb_url: Option<String>

Url of the thumbnail for the result

thumb_width: Option<u32>

Thumbnail width

thumb_height: Option<u32>

Thumbnail height

input_message_content: Option<InputMessageContent>

Content of the message to be sent instead of the location

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.

Fields of Venue

latitude: f32

Location latitude in degrees

longitude: f32

Location longitude in degrees

title: String

Location title

address: String

Address of the venue

foursquare_id: Option<String>

Foursquare identifier of the venue if known

foursquare_type: Option<String>

Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)

google_place_id: Option<String>

Google Places identifier of the venue

google_place_type: Option<String>

Google Places type of the venue. (See supported types.)

thumb_url: Option<String>

Url of the thumbnail for the result

thumb_width: Option<u32>

Thumbnail width

thumb_height: Option<u32>

Thumbnail height

input_message_content: Option<InputMessageContent>

Content of the message to be sent instead of the venue

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.

Fields of Contact

phone_number: String

Contact’s phone number

first_name: String

Contact’s first name

last_name: Option<String>

Contact’s last name

vcard: Option<String>

Additional data about the contact in the form of a vCard, 0-2048 bytes

thumb_url: Option<String>

Url of the thumbnail for the result

thumb_width: Option<u32>

Thumbnail width

thumb_height: Option<u32>

Thumbnail height

input_message_content: Option<InputMessageContent>

Content of the message to be sent instead of the contact

Game

Represents a Game.

Fields of Game

game_short_name: String

Short name of the game

CachedPhoto

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.

Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.

Fields of CachedPhoto

photo_file_id: String

A valid file identifier of the photo

title: String

Title for the result

description: Option<String>

Short description of the result

caption: Option<String>

Caption of the photo to be sent, 0-1024 characters after entities parsing

parse_mode: Option<ParseMode>

Mode for parsing entities in the photo caption. See formatting options for more details.

caption_entities: Option<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

CachedGif

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 optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.

Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.

Fields of CachedGif

gif_file_id: String

A valid file identifier for the GIF file

title: String

Title for the result

caption: Option<String>

Caption of the GIF file to be sent, 0-1024 characters after entities parsing

parse_mode: Option<ParseMode>

Mode for parsing entities in the caption. See formatting options for more details.

caption_entities: Option<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

CachedMpeg4Gif

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 optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.

Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.

Fields of CachedMpeg4Gif

mpeg4_file_id: String

A valid file identifier for the MP4 file

title: String

Title for the result

caption: Option<String>

Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing

parse_mode: Option<ParseMode>

Mode for parsing entities in the caption. See formatting options for more details.

caption_entities: Option<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

CachedVideo

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.

If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you must replace its content using input_message_content.

Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.

Fields of CachedVideo

video_file_id: String

A valid file identifier for the video file

title: String

Title for the result

description: Option<String>

Short description of the result

caption: Option<String>

Caption of the video to be sent, 0-1024 characters after entities parsing

parse_mode: Option<ParseMode>

Mode for parsing entities in the caption. See formatting options for more details.

caption_entities: Option<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).

CachedAudio

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.

Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.

Fields of CachedAudio

audio_file_id: String

A valid file identifier for the audio file

caption: Option<String>

Caption, 0-1024 characters after entities parsing

parse_mode: Option<ParseMode>

Mode for parsing entities in the caption. See formatting options for more details.

caption_entities: Option<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

CachedVoice

Represents a link to a voice message stored on the Telegram servers.

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.

Fields of CachedVoice

voice_file_id: String

A valid file identifier for the voice message

title: String

Recording title

caption: Option<String>

Caption, 0-1024 characters after entities parsing

parse_mode: Option<ParseMode>

Mode for parsing entities in the caption. See formatting options for more details.

caption_entities: Option<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

CachedDocument

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. 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.

Fields of CachedDocument

document_file_id: String

A valid file identifier for the file

title: String

Title for the result

description: String

Short description of the result

caption: Option<String>

Caption of the document to be sent, 0-1024 characters after entities parsing

parse_mode: Option<ParseMode>

Mode for parsing entities in the caption. See formatting options for more details.

caption_entities: Option<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

Implementations

Trait Implementations

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.