Data types

Bases

aiogram.types.base.Serializable

aiogram.types.base.Deserializable

aiogram.types.base.deserialize(deserializable, data)[исходный код]

Deserialize object if have data

Параметры:
  • deserializableaiogram.types.Deserializable
  • data
Результат:

aiogram.types.base.deserialize_array(deserializable, array)[исходный код]

Deserialize array of objects

Параметры:
  • deserializable
  • array
Результат:

class aiogram.types.base.Serializable[исходный код]
Базовые классы: object

Subclasses of this class are guaranteed to be able to be created from a json-style dict.

to_json()[исходный код]

Returns a JSON representation of this class.

Результат:dict
class aiogram.types.base.Deserializable[исходный код]
Базовые классы: object

Subclasses of this class are guaranteed to be able to be created from a json-style dict or json formatted string. All subclasses of this class must override de_json.

bot

Bot instance

parent

Parent object

classmethod de_json(raw_data)[исходный код]

Returns an instance of this class from the given json dict or string.

This function must be overridden by subclasses. :return: an instance of this class created from the given json dict or string.

Update

aiogram.types.Update

class aiogram.types.update.AllowedUpdates[исходный код]
Базовые классы: aiogram.utils.helper.Helper

Helper for allowed_updates parameter in getUpdates and setWebhook methods.

You can use &, + or | operators for make combination of allowed updates.

Example:
>>> bot.get_updates(allowed_updates=AllowedUpdates.MESSAGE + AllowedUpdates.EDITED_MESSAGE)
class aiogram.types.update.Update(update_id, message, edited_message, channel_post, edited_channel_post, inline_query, chosen_inline_result, callback_query, shipping_query, pre_checkout_query)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object represents an incoming update.

At most one of the optional parameters can be present in any given update.

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

WebhookInfo

aiogram.types.WebhookInfo

class aiogram.types.webhook_info.WebhookInfo(url, has_custom_certificate, pending_update_count, last_error_date, last_error_message, max_connections, allowed_updates)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

Contains information about the current status of a webhook.

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

User

aiogram.types.User

class aiogram.types.user.User(id, is_bot, first_name, last_name, username, language_code)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object represents a Telegram user or bot.

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

full_name

You can get full name of user.

Результат:str
locale

This property require Babel module

Результат:babel.core.Locale
Raise:ImportError: when babel is not installed.
mention

You can get menthion to user (If user have username, otherwise return full name)

Результат:str

Chat

aiogram.types.Chat

class aiogram.types.chat.Chat(id, type, title, username, first_name, last_name, all_members_are_administrators, photo, description, invite_link, pinned_message)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object represents a chat.

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

mention

Get mention if dialog have username or full name if this is Private dialog otherwise None

class aiogram.types.chat.ChatActions[исходный код]
Базовые классы: aiogram.utils.helper.Helper

List of chat actions

Key:TYPING
Key:UPLOAD_PHOTO
Key:RECORD_VIDEO
Key:UPLOAD_VIDEO
Key:RECORD_AUDIO
Key:UPLOAD_AUDIO
Key:UPLOAD_DOCUMENT
Key:FIND_LOCATION
Key:RECORD_VIDEO_NOTE
Key:UPLOAD_VIDEO_NOTE
class aiogram.types.chat.ChatType[исходный код]
Базовые классы: aiogram.utils.helper.Helper

List of chat types

Key:PRIVATE
Key:GROUP
Key:SUPER_GROUP
Key:CHANNEL

Message

aiogram.types.Message

class aiogram.types.message.ContentType[исходный код]
Базовые классы: aiogram.utils.helper.Helper

List of message content types

Key:TEXT
Key:AUDIO
Key:DOCUMENT
Key:GAME
Key:PHOTO
Key:STICKER
Key:VIDEO
Key:VOICE
Key:NEW_CHAT_MEMBERS
Key:LEFT_CHAT_MEMBER
Key:INVOICE
Key:SUCCESSFUL_PAYMENT
Key:UNKNOWN
class aiogram.types.message.Message(message_id, from_user, date, chat, forward_from, forward_from_chat, forward_from_message_id, forward_signature, forward_date, reply_to_message, edit_date, author_signature, text, entities, audio, document, game, photo, sticker, video, voice, video_note, new_chat_members, caption, contact, location, venue, left_chat_member, new_chat_title, new_chat_photo, delete_chat_photo, group_chat_created, supergroup_chat_created, channel_chat_created, migrate_to_chat_id, migrate_from_chat_id, pinned_message, invoice, successful_payment, content_type)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object represents a message.

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

delete()[исходный код]

Delete this message

Результат:bool
forward(chat_id, disable_notification=None) → aiogram.types.message.Message[исходный код]

Forward this message

Параметры:
  • chat_id
  • disable_notification
Результат:

get_full_command()[исходный код]

Split command and args :return: tuple of (command, args)

is_command()[исходный код]

Check message text is command :return: bool

reply(text, parse_mode=None, disable_web_page_preview=None, disable_notification=None, reply_markup=None) → aiogram.types.message.Message[исходный код]

Reply to this message

Параметры:
  • text – str
  • parse_mode – str
  • disable_web_page_preview – bool
  • disable_notification – bool
  • reply_markup
Результат:

aoigram.types.Message

class aiogram.types.message.ParseMode[исходный код]
Базовые классы: aiogram.utils.helper.Helper

Parse modes

Key:MARKDOWN
Key:HTML

MessageEntity

aiogram.types.MessageEntity

class aiogram.types.message_entity.MessageEntity(type, offset, length, url, user)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.

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

class aiogram.types.message_entity.MessageEntityType[исходный код]
Базовые классы: aiogram.utils.helper.Helper

List of entity types

Key:MENTION
Key:HASHTAG
Key:BOT_COMMAND
Key:URL
Key:EMAIL
Key:BOLD
Key:ITALIC
Key:CODE
Key:PRE
Key:TEXT_LINK
Key:TEXT_MENTION

PhotoSize

aiogram.types.PhotoSize

class aiogram.types.photo_size.PhotoSize(file_id, width, height, file_size)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object represents one size of a photo or a file / sticker thumbnail.

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

Audio

aiogram.types.Audio

class aiogram.types.audio.Audio(file_id, duration, performer, title, mime_type, file_size)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object represents an audio file to be treated as music by the Telegram clients.

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

Document

aiogram.types.Document

class aiogram.types.document.Document(file_id, thumb, file_name, mime_type, file_size)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object represents a general file (as opposed to photos, voice messages and audio files).

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

Video

aiogram.types.Video

class aiogram.types.video.Video(file_id, width, height, duration, thumb, mime_type, file_size)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object represents a video file.

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

Voice

aiogram.types.Voice

class aiogram.types.voice.Voice(file_id, duration, mime_type, file_size)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object represents a voice note.

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

VideoNote

aiogram.types.VideoNote

class aiogram.types.video_note.VideoNote(file_id, length, duration, thumb, file_size)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object represents a video message.

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

Contact

aiogram.types.Contact

class aiogram.types.contact.Contact(phone_number, first_name, last_name, user_id)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object represents a phone contact.

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

Location

aiogram.types.Location

class aiogram.types.location.Location(longitude, latitude)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object represents a point on the map.

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

Venue

aiogram.types.Venue

class aiogram.types.venue.Venue(location, title, address, foursquare_id)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object represents a venue.

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

UserProfilePhotos

aiogram.types.UserProfilePhotos

class aiogram.types.user_profile_photos.UserProfilePhotos(total_count, photos)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object represent a user’s profile pictures.

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

File

aiogram.types.File

class aiogram.types.file.File(file_id, file_size, file_path)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object represents a file ready to be downloaded.

The file can be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>.

It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile.

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

ReplyKeyboardMarkup & KeyboardButton & ReplyKeyboardRemove

aiogram.types.ReplyKeyboardMarkup

aiogram.types.KeyboardButton

aiogram.types.ReplyKeyboardRemove

class aiogram.types.reply_keyboard.ReplyKeyboardMarkup(resize_keyboard=None, one_time_keyboard=None, selective=None, row_width=3)[исходный код]
Базовые классы: aiogram.types.base.Serializable

This object represents a custom keyboard with reply options

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

class aiogram.types.reply_keyboard.KeyboardButton(text, request_contact=None, request_location=None)[исходный код]
Базовые классы: aiogram.types.base.Serializable

This object represents one button of the reply keyboard.

For simple text buttons String can be used instead of this object to specify text of the button.

Optional fields are mutually exclusive

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

class aiogram.types.reply_keyboard.ReplyKeyboardRemove(selective=None)[исходный код]
Базовые классы: aiogram.types.base.Serializable

Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard.

By default, custom keyboards are displayed until a new keyboard is sent by a bot.

An exception is made for one-time keyboards that are hidden immediately after the user presses a button

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

InlineKeyboardMarkup & InlineKeyboardButton

aiogram.types.InlineKeyboardMarkup

aiogram.types.InlineKeyboardButton

class aiogram.types.inline_keyboard.InlineKeyboardMarkup(row_width=3)[исходный код]
Базовые классы: aiogram.types.base.Serializable

This object represents an inline keyboard that appears right next to the message it belongs to.

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

class aiogram.types.inline_keyboard.InlineKeyboardButton(text, url=None, callback_data=None, switch_inline_query=None, switch_inline_query_current_chat=None, callback_game=None, pay=None)[исходный код]
Базовые классы: aiogram.types.base.Serializable

This object represents one button of an inline keyboard. You must use exactly one of the optional fields.

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

CallbackQuery

aiogram.types.CallbackQuery

class aiogram.types.callback_query.CallbackQuery(id, from_user, message, inline_message_id, chat_instance, data, game_short_name)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object represents an incoming callback query from a callback button in an inline keyboard.

If the button that originated the query was attached to a message sent by the bot, the field message will be present.

If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present.

Exactly one of the fields data or game_short_name will be present.

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

ForceReply

aiogram.types.ForceReply

class aiogram.types.force_reply.ForceReply(selective=None)[исходный код]
Базовые классы: aiogram.types.base.Serializable

Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot‘s message and tapped ’Reply’).

This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode.

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

ChatPhoto

aiogram.types.ChatPhoto

class aiogram.types.chat_photo.ChatPhoto(small_file_id, big_file_id)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object represents a chat photo.

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

ChatMember

aiogram.types.ChatMember

class aiogram.types.chat_member.ChatMember(user, status, until_date, can_be_edited, can_change_info, can_post_messages, can_edit_messages, can_delete_messages, can_invite_users, can_restrict_members, can_pin_messages, can_promote_members, can_send_messages, can_send_media_messages, can_send_other_messages, can_add_web_page_previews)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object contains information about one member of the chat.

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

ResponseParameters

aiogram.types.ResponseParameters

class aiogram.types.response_parameters.ResponseParameters(migrate_to_chat_id, retry_after)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

Contains information about why a request was unsuccessfull.

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

Sticker

aiogram.types.Sticker

class aiogram.types.sticker.Sticker(file_id, width, height, thumb, emoji, set_name, mask_position, file_size)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object represents a sticker.

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

StickerSet

aiogram.types.StickerSet

class aiogram.types.sticker_set.StickerSet(name, title, is_mask, stickers)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object represents a sticker set.

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

MaskPosition

aiogram.types.MaskPosition

class aiogram.types.mask_position.MaskPosition(point, x_shift, y_shift, zoom)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object describes the position on faces where a mask should be placed by default.

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

Inline mode objects

class aiogram.types.inline_query.InlineQuery(id, from_user, location, query, offset)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object represents an incoming inline query.

When the user sends an empty query, your bot could return some default or trending results.

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

class aiogram.types.chosen_inline_result.ChosenInlineResult(result_id, from_user, location, inline_message_id, query)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

Represents a result of an inline query that was chosen by the user and sent to their chat partner.

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

class aiogram.types.inline_query_result.InlineQueryResult[исходный код]

This object represents one result of an inline query.

Telegram clients currently support results of the following 20 types:

aiogram.types.InlineQueryResultCachedAudio

aiogram.types.InlineQueryResultCachedDocument

aiogram.types.InlineQueryResultCachedGif

aiogram.types.InlineQueryResultCachedMpeg4Gif

aiogram.types.InlineQueryResultCachedPhoto

aiogram.types.InlineQueryResultCachedSticker

aiogram.types.InlineQueryResultCachedVideo

aiogram.types.InlineQueryResultCachedVoice

aiogram.types.InlineQueryResultArticle

aiogram.types.InlineQueryResultAudio

aiogram.types.InlineQueryResultContact

aiogram.types.InlineQueryResultGame

aiogram.types.InlineQueryResultDocument

aiogram.types.InlineQueryResultGif

aiogram.types.InlineQueryResultLocation

aiogram.types.InlineQueryResultMpeg4Gif

aiogram.types.InlineQueryResultPhoto

aiogram.types.InlineQueryResultVenue

aiogram.types.InlineQueryResultVideo

aiogram.types.InlineQueryResultVoice

class aiogram.types.inline_query_result.InlineQueryResultArticle(id: str, title: str, input_message_content: aiogram.types.inline_query_result.InputMessageContent, reply_markup: aiogram.types.inline_keyboard.InlineKeyboardMarkup = None, url: str = None, hide_url: bool = None, description: str = None, thumb_url: str = None, thumb_width: int = None, thumb_height: int = None)[исходный код]

Represents a link to an article or web page.

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

class aiogram.types.inline_query_result.InlineQueryResultAudio(id: str, audio_url: str, title: str, caption: str = None, performer: str = None, audio_duration: int = None, reply_markup: aiogram.types.inline_keyboard.InlineKeyboardMarkup = None, input_message_content: aiogram.types.inline_query_result.InputMessageContent = None)[исходный код]

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.

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

class aiogram.types.inline_query_result.InlineQueryResultCachedAudio(id: str, audio_file_id: str, caption: str = None, reply_markup: aiogram.types.inline_keyboard.InlineKeyboardMarkup = None, input_message_content: aiogram.types.inline_query_result.InputMessageContent = None)[исходный код]

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.

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

class aiogram.types.inline_query_result.InlineQueryResultCachedDocument(id: str, title: str, document_file_id: str, description: str = None, caption: str = None, reply_markup: aiogram.types.inline_keyboard.InlineKeyboardMarkup = None, input_message_content: aiogram.types.inline_query_result.InputMessageContent = None)[исходный код]

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.

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

class aiogram.types.inline_query_result.InlineQueryResultCachedGif(id: str, gif_file_id: str, title: str = None, caption: str = None, reply_markup: aiogram.types.inline_keyboard.InlineKeyboardMarkup = None, input_message_content: aiogram.types.inline_query_result.InputMessageContent = None)[исходный код]

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

class aiogram.types.inline_query_result.InlineQueryResultCachedMpeg4Gif(id: str, mpeg4_file_id: str, title: str = None, caption: str = None, reply_markup: aiogram.types.inline_keyboard.InlineKeyboardMarkup = None, input_message_content: aiogram.types.inline_query_result.InputMessageContent = None)[исходный код]

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

class aiogram.types.inline_query_result.InlineQueryResultCachedPhoto(id: str, photo_file_id: str, title: str = None, description: str = None, caption: str = None, reply_markup: aiogram.types.inline_keyboard.InlineKeyboardMarkup = None, input_message_content: aiogram.types.inline_query_result.InputMessageContent = None)[исходный код]

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

class aiogram.types.inline_query_result.InlineQueryResultCachedSticker(id: str, sticker_file_id: str, reply_markup: aiogram.types.inline_keyboard.InlineKeyboardMarkup = None, input_message_content: aiogram.types.inline_query_result.InputMessageContent = None)[исходный код]

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.

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

class aiogram.types.inline_query_result.InlineQueryResultCachedVideo(id: str, video_file_id: str, title: str, description: str = None, caption: str = None, reply_markup: aiogram.types.inline_keyboard.InlineKeyboardMarkup = None, input_message_content: aiogram.types.inline_query_result.InputMessageContent = None)[исходный код]

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

class aiogram.types.inline_query_result.InlineQueryResultCachedVoice(id: str, voice_file_id: str, title: str, caption: str = None, reply_markup: aiogram.types.inline_keyboard.InlineKeyboardMarkup = None, input_message_content: aiogram.types.inline_query_result.InputMessageContent = None)[исходный код]

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.

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

class aiogram.types.inline_query_result.InlineQueryResultContact(id: str, phone_number: str, first_name: str, last_name: str = None, reply_markup: aiogram.types.inline_keyboard.InlineKeyboardMarkup = None, input_message_content: aiogram.types.inline_query_result.InputMessageContent = None, thumb_url: str = None, thumb_width: int = None, thumb_height: int = None)[исходный код]

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.

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

class aiogram.types.inline_query_result.InlineQueryResultDocument(id: str, title: str, document_url: str, mime_type: str, caption: str = None, description: str = None, reply_markup: aiogram.types.inline_keyboard.InlineKeyboardMarkup = None, input_message_content: aiogram.types.inline_query_result.InputMessageContent = None, thumb_url: str = None, thumb_width: int = None, thumb_height: int = None)[исходный код]

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.

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

class aiogram.types.inline_query_result.InlineQueryResultGame(id: str, game_short_name: str, reply_markup: aiogram.types.inline_keyboard.InlineKeyboardMarkup = None)[исходный код]

Represents a Game.

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

class aiogram.types.inline_query_result.InlineQueryResultGif(id: str, gif_url: str, thumb_url: str, gif_width: int = None, gif_height: int = None, gif_duration: int = None, title: str = None, caption: str = None, reply_markup: aiogram.types.inline_keyboard.InlineKeyboardMarkup = None, input_message_content: aiogram.types.inline_query_result.InputMessageContent = None)[исходный код]

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

class aiogram.types.inline_query_result.InlineQueryResultLocation(id: str, latitude: float, longitude: float, title: str, reply_markup: aiogram.types.inline_keyboard.InlineKeyboardMarkup = None, input_message_content: aiogram.types.inline_query_result.InputMessageContent = None, thumb_url: str = None, thumb_width: int = None, thumb_height: int = None)[исходный код]

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

class aiogram.types.inline_query_result.InlineQueryResultMpeg4Gif(id: str, mpeg4_url: str, thumb_url: str, mpeg4_width: int = None, mpeg4_height: int = None, mpeg4_duration: int = None, title: str = None, caption: str = None, reply_markup: aiogram.types.inline_keyboard.InlineKeyboardMarkup = None, input_message_content: aiogram.types.inline_query_result.InputMessageContent = None)[исходный код]

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

class aiogram.types.inline_query_result.InlineQueryResultPhoto(id: str, photo_url: str, thumb_url: str, photo_width: int = None, photo_height: int = None, title: str = None, description: str = None, caption: str = None, reply_markup: aiogram.types.inline_keyboard.InlineKeyboardMarkup = None, input_message_content: aiogram.types.inline_query_result.InputMessageContent = None)[исходный код]

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

class aiogram.types.inline_query_result.InlineQueryResultVenue(id: str, latitude: float, longitude: float, title: str, address: str, foursquare_id: str = None, reply_markup: aiogram.types.inline_keyboard.InlineKeyboardMarkup = None, input_message_content: aiogram.types.inline_query_result.InputMessageContent = None, thumb_url: str = None, thumb_width: int = None, thumb_height: int = None)[исходный код]

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.

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

class aiogram.types.inline_query_result.InlineQueryResultVideo(id: str, video_url: str, mime_type: str, thumb_url: str, title: str, caption: str = None, video_width: int = None, video_height: int = None, video_duration: int = None, description: str = None, reply_markup: aiogram.types.inline_keyboard.InlineKeyboardMarkup = None, input_message_content: aiogram.types.inline_query_result.InputMessageContent = None)[исходный код]

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.

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

class aiogram.types.inline_query_result.InlineQueryResultVoice(id: str, voice_url: str, title: str, caption: str = None, voice_duration: int = None, reply_markup: aiogram.types.inline_keyboard.InlineKeyboardMarkup = None, input_message_content: aiogram.types.inline_query_result.InputMessageContent = None)[исходный код]

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.

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

class aiogram.types.inline_query_result.InputContactMessageContent(phone_number: str, first_name: str, last_name: str = None)[исходный код]

Represents the content of a contact message to be sent as the result of an inline query.

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

class aiogram.types.inline_query_result.InputLocationMessageContent(latitude: float, longitude: float)[исходный код]

Represents the content of a location message to be sent as the result of an inline query.

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

class aiogram.types.inline_query_result.InputMessageContent[исходный код]
Базовые классы: aiogram.types.base.Serializable

This object represents the content of a message to be sent as a result of an inline query.

Telegram clients currently support the following 4 types:

aiogram.types.InputTextMessageContent aiogram.types.InputLocationMessageContent aiogram.types.InputVenueMessageContent aiogram.types.InputContactMessageContent
class aiogram.types.inline_query_result.InputTextMessageContent(message_text: str, parse_mode: str = None, disable_web_page_preview: bool = None)[исходный код]

Represents the content of a text message to be sent as the result of an inline query.

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

class aiogram.types.inline_query_result.InputVenueMessageContent(latitude: float, longitude: float, title: str, address: str, foursquare_id: str = None)[исходный код]

Represents the content of a venue message to be sent as the result of an inline query.

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

Payments

class aiogram.types.labeled_price.LabeledPrice(label, amount)[исходный код]
Базовые классы: aiogram.types.base.Serializable

This object represents a portion of the price for goods or services.

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

class aiogram.types.invoice.Invoice(title, description, start_parameter, currency, total_amount)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object contains basic information about an invoice.

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

class aiogram.types.shipping_address.ShippingAddress(country_code, state, city, street_line1, street_line2, post_code)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object represents a shipping address.

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

class aiogram.types.order_info.OrderInfo(name, phone_number, email, shipping_address)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

his object represents information about an order.

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

class aiogram.types.shipping_option.ShippingOption(id, title, prices)[исходный код]
Базовые классы: aiogram.types.base.Serializable

This object represents one shipping option.

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

class aiogram.types.successful_payment.SuccessfulPayment(currency, total_amount, invoice_payload, shipping_option_id, order_info, telegram_payment_charge_id, provider_payment_charge_id)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object contains basic information about a successful payment.

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

class aiogram.types.shipping_query.ShippingQuery(id, from_user, invoice_payload, shipping_address)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object contains information about an incoming shipping query.

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

class aiogram.types.pre_checkout_query.PreCheckoutQuery(id, from_user, currency, total_amount, invoice_payload, shipping_option_id, order_info)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object contains information about an incoming pre-checkout query.

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

Games

class aiogram.types.game.Game(title, description, photo, text, text_entities, animation)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object represents a game.

Use BotFather to create and edit games, their short names will act as unique identifiers.

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

class aiogram.types.animation.Animation(file_id, thumb, file_name, mime_type, file_size)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

You can provide an animation for your game so that it looks stylish in chats. This object represents an animation file to be displayed in the message containing a game.

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

class aiogram.types.game_high_score.GameHighScore(position, user, score)[исходный код]
Базовые классы: aiogram.types.base.Deserializable

This object represents one row of the high scores table for a game.

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