InlineQueryResult

class aiogram.types.inline_query_result.InlineQueryResult(**kwargs)[source]

Bases: TelegramObject

This object represents one result of an inline query.

Telegram clients currently support results of the following 20 types

https://core.telegram.org/bots/api#inlinequeryresult

Deserialize object

Parameters
  • conf

  • kwargs

InlineQueryResultArticle

class aiogram.types.inline_query_result.InlineQueryResultArticle(*, id: String, title: String, input_message_content: InputMessageContent, reply_markup: Optional[InlineKeyboardMarkup] = None, url: Optional[String] = None, hide_url: Optional[Boolean] = None, description: Optional[String] = None, thumb_url: Optional[String] = None, thumb_width: Optional[Integer] = None, thumb_height: Optional[Integer] = None)[source]

Bases: InlineQueryResult

Represents a link to an article or web page.

https://core.telegram.org/bots/api#inlinequeryresultarticle

Deserialize object

Parameters
  • conf

  • kwargs

InlineQueryResultPhoto

class aiogram.types.inline_query_result.InlineQueryResultPhoto(*, id: String, photo_url: String, thumb_url: String, photo_width: Optional[Integer] = None, photo_height: Optional[Integer] = None, title: Optional[String] = None, description: Optional[String] = None, caption: Optional[String] = None, parse_mode: Optional[String] = None, caption_entities: Optional[List[MessageEntity]] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, input_message_content: Optional[InputMessageContent] = None)[source]

Bases: InlineQueryResult

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.

https://core.telegram.org/bots/api#inlinequeryresultphoto

Deserialize object

Parameters
  • conf

  • kwargs

InlineQueryResultGif

class aiogram.types.inline_query_result.InlineQueryResultGif(*, id: String, gif_url: String, gif_width: Optional[Integer] = None, gif_height: Optional[Integer] = None, gif_duration: Optional[Integer] = None, thumb_url: Optional[String] = None, title: Optional[String] = None, caption: Optional[String] = None, parse_mode: Optional[String] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, caption_entities: Optional[List[MessageEntity]] = None, input_message_content: Optional[InputMessageContent] = None)[source]

Bases: InlineQueryResult

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.

https://core.telegram.org/bots/api#inlinequeryresultgif

Deserialize object

Parameters
  • conf

  • kwargs

InlineQueryResultMpeg4Gif

class aiogram.types.inline_query_result.InlineQueryResultMpeg4Gif(*, id: String, mpeg4_url: String, thumb_url: String, mpeg4_width: Optional[Integer] = None, mpeg4_height: Optional[Integer] = None, mpeg4_duration: Optional[Integer] = None, title: Optional[String] = None, caption: Optional[String] = None, parse_mode: Optional[String] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, caption_entities: Optional[List[MessageEntity]] = None, input_message_content: Optional[InputMessageContent] = None)[source]

Bases: InlineQueryResult

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.

https://core.telegram.org/bots/api#inlinequeryresultmpeg4gif

Deserialize object

Parameters
  • conf

  • kwargs

InlineQueryResultVideo

class aiogram.types.inline_query_result.InlineQueryResultVideo(*, id: String, video_url: String, mime_type: String, thumb_url: String, title: String, caption: Optional[String] = None, parse_mode: Optional[String] = None, video_width: Optional[Integer] = None, video_height: Optional[Integer] = None, video_duration: Optional[Integer] = None, description: Optional[String] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, caption_entities: Optional[List[MessageEntity]] = None, input_message_content: Optional[InputMessageContent] = None)[source]

Bases: InlineQueryResult

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.

https://core.telegram.org/bots/api#inlinequeryresultvideo

Deserialize object

Parameters
  • conf

  • kwargs

InlineQueryResultAudio

class aiogram.types.inline_query_result.InlineQueryResultAudio(*, id: String, audio_url: String, title: String, caption: Optional[String] = None, parse_mode: Optional[String] = None, performer: Optional[String] = None, audio_duration: Optional[Integer] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, caption_entities: Optional[List[MessageEntity]] = None, input_message_content: Optional[InputMessageContent] = None)[source]

Bases: InlineQueryResult

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.

https://core.telegram.org/bots/api#inlinequeryresultaudio

Deserialize object

Parameters
  • conf

  • kwargs

InlineQueryResultVoice

class aiogram.types.inline_query_result.InlineQueryResultVoice(*, id: String, voice_url: String, title: String, caption: Optional[String] = None, parse_mode: Optional[String] = None, voice_duration: Optional[Integer] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, caption_entities: Optional[List[MessageEntity]] = None, input_message_content: Optional[InputMessageContent] = None)[source]

Bases: InlineQueryResult

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.

https://core.telegram.org/bots/api#inlinequeryresultvoice

Deserialize object

Parameters
  • conf

  • kwargs

InlineQueryResultDocument

class aiogram.types.inline_query_result.InlineQueryResultDocument(*, id: String, title: String, caption: Optional[String] = None, parse_mode: Optional[String] = None, caption_entities: Optional[List[MessageEntity]] = None, document_url: Optional[String] = None, mime_type: Optional[String] = None, description: Optional[String] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, input_message_content: Optional[InputMessageContent] = None, thumb_url: Optional[String] = None, thumb_width: Optional[Integer] = None, thumb_height: Optional[Integer] = None)[source]

Bases: InlineQueryResult

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.

https://core.telegram.org/bots/api#inlinequeryresultdocument

Deserialize object

Parameters
  • conf

  • kwargs

InlineQueryResultLocation

class aiogram.types.inline_query_result.InlineQueryResultLocation(*, id: String, latitude: Float, longitude: Float, title: String, horizontal_accuracy: Optional[Float] = None, live_period: Optional[Integer] = None, heading: Optional[Integer] = None, proximity_alert_radius: Optional[Integer] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, input_message_content: Optional[InputMessageContent] = None, thumb_url: Optional[String] = None, thumb_width: Optional[Integer] = None, thumb_height: Optional[Integer] = None)[source]

Bases: InlineQueryResult

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.

https://core.telegram.org/bots/api#inlinequeryresultlocation

Deserialize object

Parameters
  • conf

  • kwargs

InlineQueryResultVenue

class aiogram.types.inline_query_result.InlineQueryResultVenue(*, id: String, latitude: Float, longitude: Float, title: String, address: String, foursquare_id: Optional[String] = None, foursquare_type: Optional[String] = None, google_place_id: Optional[String] = None, google_place_type: Optional[String] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, input_message_content: Optional[InputMessageContent] = None, thumb_url: Optional[String] = None, thumb_width: Optional[Integer] = None, thumb_height: Optional[Integer] = None)[source]

Bases: InlineQueryResult

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.

https://core.telegram.org/bots/api#inlinequeryresultvenue

Deserialize object

Parameters
  • conf

  • kwargs

InlineQueryResultContact

class aiogram.types.inline_query_result.InlineQueryResultContact(*, id: String, phone_number: String, first_name: String, last_name: Optional[String] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, input_message_content: Optional[InputMessageContent] = None, thumb_url: Optional[String] = None, thumb_width: Optional[Integer] = None, thumb_height: Optional[Integer] = None, foursquare_type: Optional[String] = None)[source]

Bases: InlineQueryResult

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.

https://core.telegram.org/bots/api#inlinequeryresultcontact

Deserialize object

Parameters
  • conf

  • kwargs

InlineQueryResultGame

class aiogram.types.inline_query_result.InlineQueryResultGame(*, id: String, game_short_name: String, reply_markup: Optional[InlineKeyboardMarkup] = None)[source]

Bases: InlineQueryResult

Represents a Game.

Note: This will only work in Telegram versions released after October 1, 2016. Older clients will not display any inline results if a game result is among them.

https://core.telegram.org/bots/api#inlinequeryresultgame

Deserialize object

Parameters
  • conf

  • kwargs

InlineQueryResultCachedPhoto

class aiogram.types.inline_query_result.InlineQueryResultCachedPhoto(*, id: String, photo_file_id: String, title: Optional[String] = None, description: Optional[String] = None, caption: Optional[String] = None, parse_mode: Optional[String] = None, caption_entities: Optional[List[MessageEntity]] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, input_message_content: Optional[InputMessageContent] = None)[source]

Bases: InlineQueryResult

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.

https://core.telegram.org/bots/api#inlinequeryresultcachedphoto

Deserialize object

Parameters
  • conf

  • kwargs

InlineQueryResultCachedGif

class aiogram.types.inline_query_result.InlineQueryResultCachedGif(*, id: String, gif_file_id: String, title: Optional[String] = None, caption: Optional[String] = None, parse_mode: Optional[String] = None, caption_entities: Optional[List[MessageEntity]] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, input_message_content: Optional[InputMessageContent] = None)[source]

Bases: InlineQueryResult

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.

https://core.telegram.org/bots/api#inlinequeryresultcachedgif

Deserialize object

Parameters
  • conf

  • kwargs

InlineQueryResultCachedMpeg4Gif

class aiogram.types.inline_query_result.InlineQueryResultCachedMpeg4Gif(*, id: String, mpeg4_file_id: String, title: Optional[String] = None, caption: Optional[String] = None, parse_mode: Optional[String] = None, caption_entities: Optional[List[MessageEntity]] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, input_message_content: Optional[InputMessageContent] = None)[source]

Bases: InlineQueryResult

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.

https://core.telegram.org/bots/api#inlinequeryresultcachedmpeg4gif

Deserialize object

Parameters
  • conf

  • kwargs

InlineQueryResultCachedSticker

class aiogram.types.inline_query_result.InlineQueryResultCachedSticker(*, id: String, sticker_file_id: String, reply_markup: Optional[InlineKeyboardMarkup] = None, input_message_content: Optional[InputMessageContent] = None)[source]

Bases: InlineQueryResult

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.

https://core.telegram.org/bots/api#inlinequeryresultcachedsticker

Deserialize object

Parameters
  • conf

  • kwargs

InlineQueryResultCachedDocument

class aiogram.types.inline_query_result.InlineQueryResultCachedDocument(*, id: String, title: String, document_file_id: String, description: Optional[String] = None, caption: Optional[String] = None, parse_mode: Optional[String] = None, caption_entities: Optional[List[MessageEntity]] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, input_message_content: Optional[InputMessageContent] = None)[source]

Bases: InlineQueryResult

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.

https://core.telegram.org/bots/api#inlinequeryresultcacheddocument

Deserialize object

Parameters
  • conf

  • kwargs

InlineQueryResultCachedVideo

class aiogram.types.inline_query_result.InlineQueryResultCachedVideo(*, id: String, video_file_id: String, title: String, description: Optional[String] = None, caption: Optional[String] = None, parse_mode: Optional[String] = None, caption_entities: Optional[List[MessageEntity]] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, input_message_content: Optional[InputMessageContent] = None)[source]

Bases: InlineQueryResult

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.

https://core.telegram.org/bots/api#inlinequeryresultcachedvideo

Deserialize object

Parameters
  • conf

  • kwargs

InlineQueryResultCachedVoice

class aiogram.types.inline_query_result.InlineQueryResultCachedVoice(*, id: String, voice_file_id: String, title: String, caption: Optional[String] = None, parse_mode: Optional[String] = None, caption_entities: Optional[List[MessageEntity]] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, input_message_content: Optional[InputMessageContent] = None)[source]

Bases: InlineQueryResult

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.

https://core.telegram.org/bots/api#inlinequeryresultcachedvoice

Deserialize object

Parameters
  • conf

  • kwargs

InlineQueryResultCachedAudio

class aiogram.types.inline_query_result.InlineQueryResultCachedAudio(*, id: String, audio_file_id: String, caption: Optional[String] = None, parse_mode: Optional[String] = None, caption_entities: Optional[List[MessageEntity]] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, input_message_content: Optional[InputMessageContent] = None)[source]

Bases: InlineQueryResult

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.

https://core.telegram.org/bots/api#inlinequeryresultcachedaudio

Deserialize object

Parameters
  • conf

  • kwargs