InlineQueryResult¶
-
class
aiogram.types.inline_query_result.InlineQueryResult(**kwargs)[source]¶ Bases:
aiogram.types.base.TelegramObjectThis object represents one result of an inline query.
Telegram clients currently support results of the following 20 types
InlineQueryResultArticle¶
-
class
aiogram.types.inline_query_result.InlineQueryResultArticle(*, id: String, title: String, input_message_content: aiogram.types.input_message_content.InputMessageContent, reply_markup: Optional[aiogram.types.inline_keyboard.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:
aiogram.types.inline_query_result.InlineQueryResultRepresents a link to an article or web page.
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, reply_markup: Optional[aiogram.types.inline_keyboard.InlineKeyboardMarkup] = None, input_message_content: Optional[aiogram.types.input_message_content.InputMessageContent] = None)[source]¶ Bases:
aiogram.types.inline_query_result.InlineQueryResultRepresents 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.
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[aiogram.types.inline_keyboard.InlineKeyboardMarkup] = None, input_message_content: Optional[aiogram.types.input_message_content.InputMessageContent] = None)[source]¶ Bases:
aiogram.types.inline_query_result.InlineQueryResultRepresents 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.
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[aiogram.types.inline_keyboard.InlineKeyboardMarkup] = None, input_message_content: Optional[aiogram.types.input_message_content.InputMessageContent] = None)[source]¶ Bases:
aiogram.types.inline_query_result.InlineQueryResultRepresents 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
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[aiogram.types.inline_keyboard.InlineKeyboardMarkup] = None, input_message_content: Optional[aiogram.types.input_message_content.InputMessageContent] = None)[source]¶ Bases:
aiogram.types.inline_query_result.InlineQueryResultRepresents 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.
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[aiogram.types.inline_keyboard.InlineKeyboardMarkup] = None, input_message_content: Optional[aiogram.types.input_message_content.InputMessageContent] = None)[source]¶ Bases:
aiogram.types.inline_query_result.InlineQueryResultRepresents 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.
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[aiogram.types.inline_keyboard.InlineKeyboardMarkup] = None, input_message_content: Optional[aiogram.types.input_message_content.InputMessageContent] = None)[source]¶ Bases:
aiogram.types.inline_query_result.InlineQueryResultRepresents 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.
InlineQueryResultDocument¶
-
class
aiogram.types.inline_query_result.InlineQueryResultDocument(*, id: String, title: String, caption: Optional[String] = None, parse_mode: Optional[String] = None, document_url: Optional[String] = None, mime_type: Optional[String] = None, description: Optional[String] = None, reply_markup: Optional[aiogram.types.inline_keyboard.InlineKeyboardMarkup] = None, input_message_content: Optional[aiogram.types.input_message_content.InputMessageContent] = None, thumb_url: Optional[String] = None, thumb_width: Optional[Integer] = None, thumb_height: Optional[Integer] = None)[source]¶ Bases:
aiogram.types.inline_query_result.InlineQueryResultRepresents 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
InlineQueryResultLocation¶
-
class
aiogram.types.inline_query_result.InlineQueryResultLocation(*, id: String, latitude: Float, longitude: Float, title: String, live_period: Optional[Integer] = None, reply_markup: Optional[aiogram.types.inline_keyboard.InlineKeyboardMarkup] = None, input_message_content: Optional[aiogram.types.input_message_content.InputMessageContent] = None, thumb_url: Optional[String] = None, thumb_width: Optional[Integer] = None, thumb_height: Optional[Integer] = None)[source]¶ Bases:
aiogram.types.inline_query_result.InlineQueryResultRepresents 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.
https://core.telegram.org/bots/api#inlinequeryresultlocation
InlineQueryResultVenue¶
-
class
aiogram.types.inline_query_result.InlineQueryResultVenue(*, id: String, latitude: Float, longitude: Float, title: String, address: String, foursquare_id: Optional[String] = None, reply_markup: Optional[aiogram.types.inline_keyboard.InlineKeyboardMarkup] = None, input_message_content: Optional[aiogram.types.input_message_content.InputMessageContent] = None, thumb_url: Optional[String] = None, thumb_width: Optional[Integer] = None, thumb_height: Optional[Integer] = None, foursquare_type: Optional[String] = None)[source]¶ Bases:
aiogram.types.inline_query_result.InlineQueryResultRepresents 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.
InlineQueryResultContact¶
-
class
aiogram.types.inline_query_result.InlineQueryResultContact(*, id: String, phone_number: String, first_name: String, last_name: Optional[String] = None, reply_markup: Optional[aiogram.types.inline_keyboard.InlineKeyboardMarkup] = None, input_message_content: Optional[aiogram.types.input_message_content.InputMessageContent] = None, thumb_url: Optional[String] = None, thumb_width: Optional[Integer] = None, thumb_height: Optional[Integer] = None, foursquare_type: Optional[String] = None)[source]¶ Bases:
aiogram.types.inline_query_result.InlineQueryResultRepresents 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.
InlineQueryResultGame¶
-
class
aiogram.types.inline_query_result.InlineQueryResultGame(*, id: String, game_short_name: String, reply_markup: Optional[aiogram.types.inline_keyboard.InlineKeyboardMarkup] = None)[source]¶ Bases:
aiogram.types.inline_query_result.InlineQueryResultRepresents 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.
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, reply_markup: Optional[aiogram.types.inline_keyboard.InlineKeyboardMarkup] = None, input_message_content: Optional[aiogram.types.input_message_content.InputMessageContent] = None)[source]¶ Bases:
aiogram.types.inline_query_result.InlineQueryResultRepresents 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
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, reply_markup: Optional[aiogram.types.inline_keyboard.InlineKeyboardMarkup] = None, input_message_content: Optional[aiogram.types.input_message_content.InputMessageContent] = None)[source]¶ Bases:
aiogram.types.inline_query_result.InlineQueryResultRepresents 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
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, reply_markup: Optional[aiogram.types.inline_keyboard.InlineKeyboardMarkup] = None, input_message_content: Optional[aiogram.types.input_message_content.InputMessageContent] = None)[source]¶ Bases:
aiogram.types.inline_query_result.InlineQueryResultRepresents 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
InlineQueryResultCachedSticker¶
-
class
aiogram.types.inline_query_result.InlineQueryResultCachedSticker(*, id: String, sticker_file_id: String, reply_markup: Optional[aiogram.types.inline_keyboard.InlineKeyboardMarkup] = None, input_message_content: Optional[aiogram.types.input_message_content.InputMessageContent] = None)[source]¶ Bases:
aiogram.types.inline_query_result.InlineQueryResultRepresents 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
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, reply_markup: Optional[aiogram.types.inline_keyboard.InlineKeyboardMarkup] = None, input_message_content: Optional[aiogram.types.input_message_content.InputMessageContent] = None)[source]¶ Bases:
aiogram.types.inline_query_result.InlineQueryResultRepresents 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
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, reply_markup: Optional[aiogram.types.inline_keyboard.InlineKeyboardMarkup] = None, input_message_content: Optional[aiogram.types.input_message_content.InputMessageContent] = None)[source]¶ Bases:
aiogram.types.inline_query_result.InlineQueryResultRepresents 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
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, reply_markup: Optional[aiogram.types.inline_keyboard.InlineKeyboardMarkup] = None, input_message_content: Optional[aiogram.types.input_message_content.InputMessageContent] = None)[source]¶ Bases:
aiogram.types.inline_query_result.InlineQueryResultRepresents 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
InlineQueryResultCachedAudio¶
-
class
aiogram.types.inline_query_result.InlineQueryResultCachedAudio(*, id: String, audio_file_id: String, caption: Optional[String] = None, parse_mode: Optional[String] = None, reply_markup: Optional[aiogram.types.inline_keyboard.InlineKeyboardMarkup] = None, input_message_content: Optional[aiogram.types.input_message_content.InputMessageContent] = None)[source]¶ Bases:
aiogram.types.inline_query_result.InlineQueryResultRepresents 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