Add autogenerated docs for types and methods

This commit is contained in:
Alex Root Junior 2019-11-16 22:32:05 +02:00
parent a24708d589
commit 65331e1fda
166 changed files with 7361 additions and 4 deletions

View file

@ -0,0 +1,32 @@
# Animation
## Description
This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).
## Attributes
| Name | Type | Description |
| - | - | - |
| `file_id` | `#!python str` | Identifier for this file |
| `width` | `#!python int` | Video width as defined by sender |
| `height` | `#!python int` | Video height as defined by sender |
| `duration` | `#!python int` | Duration of the video in seconds as defined by sender |
| `thumb` | `#!python Optional[PhotoSize]` | Optional. Animation thumbnail as defined by sender |
| `file_name` | `#!python Optional[str]` | Optional. Original animation filename as defined by sender |
| `mime_type` | `#!python Optional[str]` | Optional. MIME type of the file as defined by sender |
| `file_size` | `#!python Optional[int]` | Optional. File size |
## Location
- `from aiogram.types import Animation`
- `from aiogram.api.types import Animation`
- `from aiogram.api.types.animation import Animation`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#animation)
- [aiogram.types.PhotoSize](../types/photo_size.md)

31
docs/api/types/audio.md Normal file
View file

@ -0,0 +1,31 @@
# Audio
## Description
This object represents an audio file to be treated as music by the Telegram clients.
## Attributes
| Name | Type | Description |
| - | - | - |
| `file_id` | `#!python str` | Identifier for this file |
| `duration` | `#!python int` | Duration of the audio in seconds as defined by sender |
| `performer` | `#!python Optional[str]` | Optional. Performer of the audio as defined by sender or by audio tags |
| `title` | `#!python Optional[str]` | Optional. Title of the audio as defined by sender or by audio tags |
| `mime_type` | `#!python Optional[str]` | Optional. MIME type of the file as defined by sender |
| `file_size` | `#!python Optional[int]` | Optional. File size |
| `thumb` | `#!python Optional[PhotoSize]` | Optional. Thumbnail of the album cover to which the music file belongs |
## Location
- `from aiogram.types import Audio`
- `from aiogram.api.types import Audio`
- `from aiogram.api.types.audio import Audio`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#audio)
- [aiogram.types.PhotoSize](../types/photo_size.md)

View file

@ -0,0 +1,18 @@
# CallbackGame
## Description
A placeholder, currently holds no information. Use BotFather to set up your game.
## Location
- `from aiogram.types import CallbackGame`
- `from aiogram.api.types import CallbackGame`
- `from aiogram.api.types.callback_game import CallbackGame`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#callbackgame)

View file

@ -0,0 +1,34 @@
# CallbackQuery
## Description
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.
NOTE: After the user presses a callback button, Telegram clients will display a progress bar until you call answerCallbackQuery. It is, therefore, necessary to react by calling answerCallbackQuery even if no notification to the user is needed (e.g., without specifying any of the optional parameters).
## Attributes
| Name | Type | Description |
| - | - | - |
| `id` | `#!python str` | Unique identifier for this query |
| `from_user` | `#!python User` | Sender |
| `chat_instance` | `#!python str` | Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games. |
| `message` | `#!python Optional[Message]` | Optional. Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old |
| `inline_message_id` | `#!python Optional[str]` | Optional. Identifier of the message sent via the bot in inline mode, that originated the query. |
| `data` | `#!python Optional[str]` | Optional. Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field. |
| `game_short_name` | `#!python Optional[str]` | Optional. Short name of a Game to be returned, serves as the unique identifier for the game |
## Location
- `from aiogram.types import CallbackQuery`
- `from aiogram.api.types import CallbackQuery`
- `from aiogram.api.types.callback_query import CallbackQuery`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#callbackquery)
- [aiogram.types.User](../types/user.md)
- [aiogram.types.Message](../types/message.md)

39
docs/api/types/chat.md Normal file
View file

@ -0,0 +1,39 @@
# Chat
## Description
This object represents a chat.
## Attributes
| Name | Type | Description |
| - | - | - |
| `id` | `#!python int` | Unique identifier for this chat. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. |
| `type` | `#!python str` | Type of chat, can be either 'private', 'group', 'supergroup' or 'channel' |
| `title` | `#!python Optional[str]` | Optional. Title, for supergroups, channels and group chats |
| `username` | `#!python Optional[str]` | Optional. Username, for private chats, supergroups and channels if available |
| `first_name` | `#!python Optional[str]` | Optional. First name of the other party in a private chat |
| `last_name` | `#!python Optional[str]` | Optional. Last name of the other party in a private chat |
| `photo` | `#!python Optional[ChatPhoto]` | Optional. Chat photo. Returned only in getChat. |
| `description` | `#!python Optional[str]` | Optional. Description, for groups, supergroups and channel chats. Returned only in getChat. |
| `invite_link` | `#!python Optional[str]` | Optional. Chat invite link, for groups, supergroups and channel chats. Each administrator in a chat generates their own invite links, so the bot must first generate the link using exportChatInviteLink. Returned only in getChat. |
| `pinned_message` | `#!python Optional[Message]` | Optional. Pinned message, for groups, supergroups and channels. Returned only in getChat. |
| `permissions` | `#!python Optional[ChatPermissions]` | Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat. |
| `sticker_set_name` | `#!python Optional[str]` | Optional. For supergroups, name of group sticker set. Returned only in getChat. |
| `can_set_sticker_set` | `#!python Optional[bool]` | Optional. True, if the bot can change the group sticker set. Returned only in getChat. |
## Location
- `from aiogram.types import Chat`
- `from aiogram.api.types import Chat`
- `from aiogram.api.types.chat import Chat`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#chat)
- [aiogram.types.ChatPermissions](../types/chat_permissions.md)
- [aiogram.types.ChatPhoto](../types/chat_photo.md)
- [aiogram.types.Message](../types/message.md)

View file

@ -0,0 +1,42 @@
# ChatMember
## Description
This object contains information about one member of a chat.
## Attributes
| Name | Type | Description |
| - | - | - |
| `user` | `#!python User` | Information about the user |
| `status` | `#!python str` | The member's status in the chat. Can be 'creator', 'administrator', 'member', 'restricted', 'left' or 'kicked' |
| `until_date` | `#!python Optional[Union[int, datetime.datetime, datetime.timedelta]]` | Optional. Restricted and kicked only. Date when restrictions will be lifted for this user; unix time |
| `can_be_edited` | `#!python Optional[bool]` | Optional. Administrators only. True, if the bot is allowed to edit administrator privileges of that user |
| `can_post_messages` | `#!python Optional[bool]` | Optional. Administrators only. True, if the administrator can post in the channel; channels only |
| `can_edit_messages` | `#!python Optional[bool]` | Optional. Administrators only. True, if the administrator can edit messages of other users and can pin messages; channels only |
| `can_delete_messages` | `#!python Optional[bool]` | Optional. Administrators only. True, if the administrator can delete messages of other users |
| `can_restrict_members` | `#!python Optional[bool]` | Optional. Administrators only. True, if the administrator can restrict, ban or unban chat members |
| `can_promote_members` | `#!python Optional[bool]` | Optional. Administrators only. True, if the administrator can add new administrators with a subset of his own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user) |
| `can_change_info` | `#!python Optional[bool]` | Optional. Administrators and restricted only. True, if the user is allowed to change the chat title, photo and other settings |
| `can_invite_users` | `#!python Optional[bool]` | Optional. Administrators and restricted only. True, if the user is allowed to invite new users to the chat |
| `can_pin_messages` | `#!python Optional[bool]` | Optional. Administrators and restricted only. True, if the user is allowed to pin messages; groups and supergroups only |
| `is_member` | `#!python Optional[bool]` | Optional. Restricted only. True, if the user is a member of the chat at the moment of the request |
| `can_send_messages` | `#!python Optional[bool]` | Optional. Restricted only. True, if the user is allowed to send text messages, contacts, locations and venues |
| `can_send_media_messages` | `#!python Optional[bool]` | Optional. Restricted only. True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes |
| `can_send_polls` | `#!python Optional[bool]` | Optional. Restricted only. True, if the user is allowed to send polls |
| `can_send_other_messages` | `#!python Optional[bool]` | Optional. Restricted only. True, if the user is allowed to send animations, games, stickers and use inline bots |
| `can_add_web_page_previews` | `#!python Optional[bool]` | Optional. Restricted only. True, if the user is allowed to add web page previews to their messages |
## Location
- `from aiogram.types import ChatMember`
- `from aiogram.api.types import ChatMember`
- `from aiogram.api.types.chat_member import ChatMember`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#chatmember)
- [aiogram.types.User](../types/user.md)

View file

@ -0,0 +1,31 @@
# ChatPermissions
## Description
Describes actions that a non-administrator user is allowed to take in a chat.
## Attributes
| Name | Type | Description |
| - | - | - |
| `can_send_messages` | `#!python Optional[bool]` | Optional. True, if the user is allowed to send text messages, contacts, locations and venues |
| `can_send_media_messages` | `#!python Optional[bool]` | Optional. True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages |
| `can_send_polls` | `#!python Optional[bool]` | Optional. True, if the user is allowed to send polls, implies can_send_messages |
| `can_send_other_messages` | `#!python Optional[bool]` | Optional. True, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages |
| `can_add_web_page_previews` | `#!python Optional[bool]` | Optional. True, if the user is allowed to add web page previews to their messages, implies can_send_media_messages |
| `can_change_info` | `#!python Optional[bool]` | Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups |
| `can_invite_users` | `#!python Optional[bool]` | Optional. True, if the user is allowed to invite new users to the chat |
| `can_pin_messages` | `#!python Optional[bool]` | Optional. True, if the user is allowed to pin messages. Ignored in public supergroups |
## Location
- `from aiogram.types import ChatPermissions`
- `from aiogram.api.types import ChatPermissions`
- `from aiogram.api.types.chat_permissions import ChatPermissions`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#chatpermissions)

View file

@ -0,0 +1,25 @@
# ChatPhoto
## Description
This object represents a chat photo.
## Attributes
| Name | Type | Description |
| - | - | - |
| `small_file_id` | `#!python str` | File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed. |
| `big_file_id` | `#!python str` | File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed. |
## Location
- `from aiogram.types import ChatPhoto`
- `from aiogram.api.types import ChatPhoto`
- `from aiogram.api.types.chat_photo import ChatPhoto`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#chatphoto)

View file

@ -0,0 +1,32 @@
# ChosenInlineResult
## Description
Represents a result of an inline query that was chosen by the user and sent to their chat partner.
Note: It is necessary to enable inline feedback via @Botfather in order to receive these objects in updates.
## Attributes
| Name | Type | Description |
| - | - | - |
| `result_id` | `#!python str` | The unique identifier for the result that was chosen |
| `from_user` | `#!python User` | The user that chose the result |
| `query` | `#!python str` | The query that was used to obtain the result |
| `location` | `#!python Optional[Location]` | Optional. Sender location, only for bots that require user location |
| `inline_message_id` | `#!python Optional[str]` | Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message. |
## Location
- `from aiogram.types import ChosenInlineResult`
- `from aiogram.api.types import ChosenInlineResult`
- `from aiogram.api.types.chosen_inline_result import ChosenInlineResult`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#choseninlineresult)
- [aiogram.types.Location](../types/location.md)
- [aiogram.types.User](../types/user.md)

28
docs/api/types/contact.md Normal file
View file

@ -0,0 +1,28 @@
# Contact
## Description
This object represents a phone contact.
## Attributes
| Name | Type | Description |
| - | - | - |
| `phone_number` | `#!python str` | Contact's phone number |
| `first_name` | `#!python str` | Contact's first name |
| `last_name` | `#!python Optional[str]` | Optional. Contact's last name |
| `user_id` | `#!python Optional[int]` | Optional. Contact's user identifier in Telegram |
| `vcard` | `#!python Optional[str]` | Optional. Additional data about the contact in the form of a vCard |
## Location
- `from aiogram.types import Contact`
- `from aiogram.api.types import Contact`
- `from aiogram.api.types.contact import Contact`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#contact)

View file

@ -0,0 +1,29 @@
# Document
## Description
This object represents a general file (as opposed to photos, voice messages and audio files).
## Attributes
| Name | Type | Description |
| - | - | - |
| `file_id` | `#!python str` | Identifier for this file |
| `thumb` | `#!python Optional[PhotoSize]` | Optional. Document thumbnail as defined by sender |
| `file_name` | `#!python Optional[str]` | Optional. Original filename as defined by sender |
| `mime_type` | `#!python Optional[str]` | Optional. MIME type of the file as defined by sender |
| `file_size` | `#!python Optional[int]` | Optional. File size |
## Location
- `from aiogram.types import Document`
- `from aiogram.api.types import Document`
- `from aiogram.api.types.document import Document`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#document)
- [aiogram.types.PhotoSize](../types/photo_size.md)

View file

@ -0,0 +1,26 @@
# EncryptedCredentials
## Description
Contains data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes.
## Attributes
| Name | Type | Description |
| - | - | - |
| `data` | `#!python str` | Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication |
| `hash` | `#!python str` | Base64-encoded data hash for data authentication |
| `secret` | `#!python str` | Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption |
## Location
- `from aiogram.types import EncryptedCredentials`
- `from aiogram.api.types import EncryptedCredentials`
- `from aiogram.api.types.encrypted_credentials import EncryptedCredentials`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#encryptedcredentials)

View file

@ -0,0 +1,34 @@
# EncryptedPassportElement
## Description
Contains information about documents or other Telegram Passport elements shared with the bot by the user.
## Attributes
| Name | Type | Description |
| - | - | - |
| `type` | `#!python str` | Element type. One of 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport', 'address', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration', 'phone_number', 'email'. |
| `hash` | `#!python str` | Base64-encoded element hash for using in PassportElementErrorUnspecified |
| `data` | `#!python Optional[str]` | Optional. Base64-encoded encrypted Telegram Passport element data provided by the user, available for 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport' and 'address' types. Can be decrypted and verified using the accompanying EncryptedCredentials. |
| `phone_number` | `#!python Optional[str]` | Optional. User's verified phone number, available only for 'phone_number' type |
| `email` | `#!python Optional[str]` | Optional. User's verified email address, available only for 'email' type |
| `files` | `#!python Optional[List[PassportFile]]` | Optional. Array of encrypted files with documents provided by the user, available for 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying EncryptedCredentials. |
| `front_side` | `#!python Optional[PassportFile]` | Optional. Encrypted file with the front side of the document, provided by the user. Available for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying EncryptedCredentials. |
| `reverse_side` | `#!python Optional[PassportFile]` | Optional. Encrypted file with the reverse side of the document, provided by the user. Available for 'driver_license' and 'identity_card'. The file can be decrypted and verified using the accompanying EncryptedCredentials. |
| `selfie` | `#!python Optional[PassportFile]` | Optional. Encrypted file with the selfie of the user holding a document, provided by the user; available for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying EncryptedCredentials. |
| `translation` | `#!python Optional[List[PassportFile]]` | Optional. Array of encrypted files with translated versions of documents provided by the user. Available if requested for 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying EncryptedCredentials. |
## Location
- `from aiogram.types import EncryptedPassportElement`
- `from aiogram.api.types import EncryptedPassportElement`
- `from aiogram.api.types.encrypted_passport_element import EncryptedPassportElement`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#encryptedpassportelement)
- [aiogram.types.PassportFile](../types/passport_file.md)

28
docs/api/types/file.md Normal file
View file

@ -0,0 +1,28 @@
# File
## Description
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.
Maximum file size to download is 20 MB
## Attributes
| Name | Type | Description |
| - | - | - |
| `file_id` | `#!python str` | Identifier for this file |
| `file_size` | `#!python Optional[int]` | Optional. File size, if known |
| `file_path` | `#!python Optional[str]` | Optional. File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file. |
## Location
- `from aiogram.types import File`
- `from aiogram.api.types import File`
- `from aiogram.api.types.file import File`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#file)

View file

@ -0,0 +1,35 @@
# ForceReply
## Description
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 bots 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.
Example: A poll bot for groups runs in privacy mode (only receives commands, replies to its messages and mentions). There could be two ways to create a new poll:
Explain the user how to send a command with parameters (e.g. /newpoll question answer1 answer2). May be appealing for hardcore users but lacks modern day polish.
Guide the user through a step-by-step process. Please send me your question, Cool, now lets add the first answer option, Great. Keep adding answer options, then send /done when youre ready.
The last option is definitely more attractive. And if you use ForceReply in your bots questions, it will receive the users answers even if it only receives replies, commands and mentions — without any extra work for the user.
## Attributes
| Name | Type | Description |
| - | - | - |
| `force_reply` | `#!python bool` | Shows reply interface to the user, as if they manually selected the bots message and tapped Reply' |
| `selective` | `#!python Optional[bool]` | Optional. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message. |
## Location
- `from aiogram.types import ForceReply`
- `from aiogram.api.types import ForceReply`
- `from aiogram.api.types.force_reply import ForceReply`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#forcereply)

32
docs/api/types/game.md Normal file
View file

@ -0,0 +1,32 @@
# Game
## Description
This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.
## Attributes
| Name | Type | Description |
| - | - | - |
| `title` | `#!python str` | Title of the game |
| `description` | `#!python str` | Description of the game |
| `photo` | `#!python List[PhotoSize]` | Photo that will be displayed in the game message in chats. |
| `text` | `#!python Optional[str]` | Optional. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters. |
| `text_entities` | `#!python Optional[List[MessageEntity]]` | Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc. |
| `animation` | `#!python Optional[Animation]` | Optional. Animation that will be displayed in the game message in chats. Upload via BotFather |
## Location
- `from aiogram.types import Game`
- `from aiogram.api.types import Game`
- `from aiogram.api.types.game import Game`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#game)
- [aiogram.types.MessageEntity](../types/message_entity.md)
- [aiogram.types.Animation](../types/animation.md)
- [aiogram.types.PhotoSize](../types/photo_size.md)

View file

@ -0,0 +1,31 @@
# GameHighScore
## Description
This object represents one row of the high scores table for a game.
And thats about all weve got for now.
If you've got any questions, please check out our Bot FAQ
## Attributes
| Name | Type | Description |
| - | - | - |
| `position` | `#!python int` | Position in high score table for the game |
| `user` | `#!python User` | User |
| `score` | `#!python int` | Score |
## Location
- `from aiogram.types import GameHighScore`
- `from aiogram.api.types import GameHighScore`
- `from aiogram.api.types.game_high_score import GameHighScore`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#gamehighscore)
- [aiogram.types.User](../types/user.md)

View file

@ -0,0 +1,33 @@
# InlineKeyboardButton
## Description
This object represents one button of an inline keyboard. You must use exactly one of the optional fields.
## Attributes
| Name | Type | Description |
| - | - | - |
| `text` | `#!python str` | Label text on the button |
| `url` | `#!python Optional[str]` | Optional. HTTP or tg:// url to be opened when button is pressed |
| `login_url` | `#!python Optional[LoginUrl]` | Optional. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget. |
| `callback_data` | `#!python Optional[str]` | Optional. Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes |
| `switch_inline_query` | `#!python Optional[str]` | Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bots username and the specified inline query in the input field. Can be empty, in which case just the bots username will be inserted. |
| `switch_inline_query_current_chat` | `#!python Optional[str]` | Optional. If set, pressing the button will insert the bots username and the specified inline query in the current chat's input field. Can be empty, in which case only the bots username will be inserted. |
| `callback_game` | `#!python Optional[CallbackGame]` | Optional. Description of the game that will be launched when the user presses the button. |
| `pay` | `#!python Optional[bool]` | Optional. Specify True, to send a Pay button. |
## Location
- `from aiogram.types import InlineKeyboardButton`
- `from aiogram.api.types import InlineKeyboardButton`
- `from aiogram.api.types.inline_keyboard_button import InlineKeyboardButton`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inlinekeyboardbutton)
- [aiogram.types.LoginUrl](../types/login_url.md)
- [aiogram.types.CallbackGame](../types/callback_game.md)

View file

@ -0,0 +1,27 @@
# InlineKeyboardMarkup
## Description
This object represents an inline keyboard that appears right next to the message it belongs to.
Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message.
## Attributes
| Name | Type | Description |
| - | - | - |
| `inline_keyboard` | `#!python List[List[InlineKeyboardButton]]` | Array of button rows, each represented by an Array of InlineKeyboardButton objects |
## Location
- `from aiogram.types import InlineKeyboardMarkup`
- `from aiogram.api.types import InlineKeyboardMarkup`
- `from aiogram.api.types.inline_keyboard_markup import InlineKeyboardMarkup`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inlinekeyboardmarkup)
- [aiogram.types.InlineKeyboardButton](../types/inline_keyboard_button.md)

View file

@ -0,0 +1,30 @@
# InlineQuery
## Description
This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.
## Attributes
| Name | Type | Description |
| - | - | - |
| `id` | `#!python str` | Unique identifier for this query |
| `from_user` | `#!python User` | Sender |
| `query` | `#!python str` | Text of the query (up to 512 characters) |
| `offset` | `#!python str` | Offset of the results to be returned, can be controlled by the bot |
| `location` | `#!python Optional[Location]` | Optional. Sender location, only for bots that request user location |
## Location
- `from aiogram.types import InlineQuery`
- `from aiogram.api.types import InlineQuery`
- `from aiogram.api.types.inline_query import InlineQuery`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inlinequery)
- [aiogram.types.Location](../types/location.md)
- [aiogram.types.User](../types/user.md)

View file

@ -0,0 +1,58 @@
# InlineQueryResult
## Description
This object represents one result of an inline query. Telegram clients currently support results of the following 20 types:
- InlineQueryResultCachedAudio
- InlineQueryResultCachedDocument
- InlineQueryResultCachedGif
- InlineQueryResultCachedMpeg4Gif
- InlineQueryResultCachedPhoto
- InlineQueryResultCachedSticker
- InlineQueryResultCachedVideo
- InlineQueryResultCachedVoice
- InlineQueryResultArticle
- InlineQueryResultAudio
- InlineQueryResultContact
- InlineQueryResultGame
- InlineQueryResultDocument
- InlineQueryResultGif
- InlineQueryResultLocation
- InlineQueryResultMpeg4Gif
- InlineQueryResultPhoto
- InlineQueryResultVenue
- InlineQueryResultVideo
- InlineQueryResultVoice
## Location
- `from aiogram.types import InlineQueryResult`
- `from aiogram.api.types import InlineQueryResult`
- `from aiogram.api.types.inline_query_result import InlineQueryResult`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inlinequeryresult)

View file

@ -0,0 +1,36 @@
# InlineQueryResultArticle
## Description
Represents a link to an article or web page.
## Attributes
| Name | Type | Description |
| - | - | - |
| `type` | `#!python str` | Type of the result, must be article |
| `id` | `#!python str` | Unique identifier for this result, 1-64 Bytes |
| `title` | `#!python str` | Title of the result |
| `input_message_content` | `#!python InputMessageContent` | Content of the message to be sent |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `url` | `#!python Optional[str]` | Optional. URL of the result |
| `hide_url` | `#!python Optional[bool]` | Optional. Pass True, if you don't want the URL to be shown in the message |
| `description` | `#!python Optional[str]` | Optional. Short description of the result |
| `thumb_url` | `#!python Optional[str]` | Optional. Url of the thumbnail for the result |
| `thumb_width` | `#!python Optional[int]` | Optional. Thumbnail width |
| `thumb_height` | `#!python Optional[int]` | Optional. Thumbnail height |
## Location
- `from aiogram.types import InlineQueryResultArticle`
- `from aiogram.api.types import InlineQueryResultArticle`
- `from aiogram.api.types.inline_query_result_article import InlineQueryResultArticle`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultarticle)
- [aiogram.types.InputMessageContent](../types/input_message_content.md)
- [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md)

View file

@ -0,0 +1,37 @@
# InlineQueryResultAudio
## Description
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.
## Attributes
| Name | Type | Description |
| - | - | - |
| `type` | `#!python str` | Type of the result, must be audio |
| `id` | `#!python str` | Unique identifier for this result, 1-64 bytes |
| `audio_url` | `#!python str` | A valid URL for the audio file |
| `title` | `#!python str` | Title |
| `caption` | `#!python Optional[str]` | Optional. Caption, 0-1024 characters |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `performer` | `#!python Optional[str]` | Optional. Performer |
| `audio_duration` | `#!python Optional[int]` | Optional. Audio duration in seconds |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the audio |
## Location
- `from aiogram.types import InlineQueryResultAudio`
- `from aiogram.api.types import InlineQueryResultAudio`
- `from aiogram.api.types.inline_query_result_audio import InlineQueryResultAudio`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultaudio)
- [aiogram.types.InputMessageContent](../types/input_message_content.md)
- [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md)

View file

@ -0,0 +1,34 @@
# InlineQueryResultCachedAudio
## Description
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.
## Attributes
| Name | Type | Description |
| - | - | - |
| `type` | `#!python str` | Type of the result, must be audio |
| `id` | `#!python str` | Unique identifier for this result, 1-64 bytes |
| `audio_file_id` | `#!python str` | A valid file identifier for the audio file |
| `caption` | `#!python Optional[str]` | Optional. Caption, 0-1024 characters |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the audio |
## Location
- `from aiogram.types import InlineQueryResultCachedAudio`
- `from aiogram.api.types import InlineQueryResultCachedAudio`
- `from aiogram.api.types.inline_query_result_cached_audio import InlineQueryResultCachedAudio`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultcachedaudio)
- [aiogram.types.InputMessageContent](../types/input_message_content.md)
- [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md)

View file

@ -0,0 +1,36 @@
# InlineQueryResultCachedDocument
## Description
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.
## Attributes
| Name | Type | Description |
| - | - | - |
| `type` | `#!python str` | Type of the result, must be document |
| `id` | `#!python str` | Unique identifier for this result, 1-64 bytes |
| `title` | `#!python str` | Title for the result |
| `document_file_id` | `#!python str` | A valid file identifier for the file |
| `description` | `#!python Optional[str]` | Optional. Short description of the result |
| `caption` | `#!python Optional[str]` | Optional. Caption of the document to be sent, 0-1024 characters |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the file |
## Location
- `from aiogram.types import InlineQueryResultCachedDocument`
- `from aiogram.api.types import InlineQueryResultCachedDocument`
- `from aiogram.api.types.inline_query_result_cached_document import InlineQueryResultCachedDocument`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultcacheddocument)
- [aiogram.types.InputMessageContent](../types/input_message_content.md)
- [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md)

View file

@ -0,0 +1,33 @@
# InlineQueryResultCachedGif
## Description
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.
## Attributes
| Name | Type | Description |
| - | - | - |
| `type` | `#!python str` | Type of the result, must be gif |
| `id` | `#!python str` | Unique identifier for this result, 1-64 bytes |
| `gif_file_id` | `#!python str` | A valid file identifier for the GIF file |
| `title` | `#!python Optional[str]` | Optional. Title for the result |
| `caption` | `#!python Optional[str]` | Optional. Caption of the GIF file to be sent, 0-1024 characters |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the GIF animation |
## Location
- `from aiogram.types import InlineQueryResultCachedGif`
- `from aiogram.api.types import InlineQueryResultCachedGif`
- `from aiogram.api.types.inline_query_result_cached_gif import InlineQueryResultCachedGif`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultcachedgif)
- [aiogram.types.InputMessageContent](../types/input_message_content.md)
- [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md)

View file

@ -0,0 +1,33 @@
# InlineQueryResultCachedMpeg4Gif
## Description
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.
## Attributes
| Name | Type | Description |
| - | - | - |
| `type` | `#!python str` | Type of the result, must be mpeg4_gif |
| `id` | `#!python str` | Unique identifier for this result, 1-64 bytes |
| `mpeg4_file_id` | `#!python str` | A valid file identifier for the MP4 file |
| `title` | `#!python Optional[str]` | Optional. Title for the result |
| `caption` | `#!python Optional[str]` | Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the video animation |
## Location
- `from aiogram.types import InlineQueryResultCachedMpeg4Gif`
- `from aiogram.api.types import InlineQueryResultCachedMpeg4Gif`
- `from aiogram.api.types.inline_query_result_cached_mpeg4_gif import InlineQueryResultCachedMpeg4Gif`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultcachedmpeg4gif)
- [aiogram.types.InputMessageContent](../types/input_message_content.md)
- [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md)

View file

@ -0,0 +1,34 @@
# InlineQueryResultCachedPhoto
## Description
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.
## Attributes
| Name | Type | Description |
| - | - | - |
| `type` | `#!python str` | Type of the result, must be photo |
| `id` | `#!python str` | Unique identifier for this result, 1-64 bytes |
| `photo_file_id` | `#!python str` | A valid file identifier of the photo |
| `title` | `#!python Optional[str]` | Optional. Title for the result |
| `description` | `#!python Optional[str]` | Optional. Short description of the result |
| `caption` | `#!python Optional[str]` | Optional. Caption of the photo to be sent, 0-1024 characters |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the photo |
## Location
- `from aiogram.types import InlineQueryResultCachedPhoto`
- `from aiogram.api.types import InlineQueryResultCachedPhoto`
- `from aiogram.api.types.inline_query_result_cached_photo import InlineQueryResultCachedPhoto`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultcachedphoto)
- [aiogram.types.InputMessageContent](../types/input_message_content.md)
- [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md)

View file

@ -0,0 +1,32 @@
# InlineQueryResultCachedSticker
## Description
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 for static stickers and after 06 July, 2019 for animated stickers. Older clients will ignore them.
## Attributes
| Name | Type | Description |
| - | - | - |
| `type` | `#!python str` | Type of the result, must be sticker |
| `id` | `#!python str` | Unique identifier for this result, 1-64 bytes |
| `sticker_file_id` | `#!python str` | A valid file identifier of the sticker |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the sticker |
## Location
- `from aiogram.types import InlineQueryResultCachedSticker`
- `from aiogram.api.types import InlineQueryResultCachedSticker`
- `from aiogram.api.types.inline_query_result_cached_sticker import InlineQueryResultCachedSticker`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultcachedsticker)
- [aiogram.types.InputMessageContent](../types/input_message_content.md)
- [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md)

View file

@ -0,0 +1,34 @@
# InlineQueryResultCachedVideo
## Description
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.
## Attributes
| Name | Type | Description |
| - | - | - |
| `type` | `#!python str` | Type of the result, must be video |
| `id` | `#!python str` | Unique identifier for this result, 1-64 bytes |
| `video_file_id` | `#!python str` | A valid file identifier for the video file |
| `title` | `#!python str` | Title for the result |
| `description` | `#!python Optional[str]` | Optional. Short description of the result |
| `caption` | `#!python Optional[str]` | Optional. Caption of the video to be sent, 0-1024 characters |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the video |
## Location
- `from aiogram.types import InlineQueryResultCachedVideo`
- `from aiogram.api.types import InlineQueryResultCachedVideo`
- `from aiogram.api.types.inline_query_result_cached_video import InlineQueryResultCachedVideo`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultcachedvideo)
- [aiogram.types.InputMessageContent](../types/input_message_content.md)
- [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md)

View file

@ -0,0 +1,35 @@
# InlineQueryResultCachedVoice
## Description
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.
## Attributes
| Name | Type | Description |
| - | - | - |
| `type` | `#!python str` | Type of the result, must be voice |
| `id` | `#!python str` | Unique identifier for this result, 1-64 bytes |
| `voice_file_id` | `#!python str` | A valid file identifier for the voice message |
| `title` | `#!python str` | Voice message title |
| `caption` | `#!python Optional[str]` | Optional. Caption, 0-1024 characters |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the voice message |
## Location
- `from aiogram.types import InlineQueryResultCachedVoice`
- `from aiogram.api.types import InlineQueryResultCachedVoice`
- `from aiogram.api.types.inline_query_result_cached_voice import InlineQueryResultCachedVoice`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultcachedvoice)
- [aiogram.types.InputMessageContent](../types/input_message_content.md)
- [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md)

View file

@ -0,0 +1,38 @@
# InlineQueryResultContact
## Description
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.
## Attributes
| Name | Type | Description |
| - | - | - |
| `type` | `#!python str` | Type of the result, must be contact |
| `id` | `#!python str` | Unique identifier for this result, 1-64 Bytes |
| `phone_number` | `#!python str` | Contact's phone number |
| `first_name` | `#!python str` | Contact's first name |
| `last_name` | `#!python Optional[str]` | Optional. Contact's last name |
| `vcard` | `#!python Optional[str]` | Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the contact |
| `thumb_url` | `#!python Optional[str]` | Optional. Url of the thumbnail for the result |
| `thumb_width` | `#!python Optional[int]` | Optional. Thumbnail width |
| `thumb_height` | `#!python Optional[int]` | Optional. Thumbnail height |
## Location
- `from aiogram.types import InlineQueryResultContact`
- `from aiogram.api.types import InlineQueryResultContact`
- `from aiogram.api.types.inline_query_result_contact import InlineQueryResultContact`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultcontact)
- [aiogram.types.InputMessageContent](../types/input_message_content.md)
- [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md)

View file

@ -0,0 +1,40 @@
# InlineQueryResultDocument
## Description
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.
## Attributes
| Name | Type | Description |
| - | - | - |
| `type` | `#!python str` | Type of the result, must be document |
| `id` | `#!python str` | Unique identifier for this result, 1-64 bytes |
| `title` | `#!python str` | Title for the result |
| `document_url` | `#!python str` | A valid URL for the file |
| `mime_type` | `#!python str` | Mime type of the content of the file, either 'application/pdf' or 'application/zip' |
| `caption` | `#!python Optional[str]` | Optional. Caption of the document to be sent, 0-1024 characters |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `description` | `#!python Optional[str]` | Optional. Short description of the result |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the file |
| `thumb_url` | `#!python Optional[str]` | Optional. URL of the thumbnail (jpeg only) for the file |
| `thumb_width` | `#!python Optional[int]` | Optional. Thumbnail width |
| `thumb_height` | `#!python Optional[int]` | Optional. Thumbnail height |
## Location
- `from aiogram.types import InlineQueryResultDocument`
- `from aiogram.api.types import InlineQueryResultDocument`
- `from aiogram.api.types.inline_query_result_document import InlineQueryResultDocument`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultdocument)
- [aiogram.types.InputMessageContent](../types/input_message_content.md)
- [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md)

View file

@ -0,0 +1,30 @@
# InlineQueryResultGame
## Description
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.
## Attributes
| Name | Type | Description |
| - | - | - |
| `type` | `#!python str` | Type of the result, must be game |
| `id` | `#!python str` | Unique identifier for this result, 1-64 bytes |
| `game_short_name` | `#!python str` | Short name of the game |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
## Location
- `from aiogram.types import InlineQueryResultGame`
- `from aiogram.api.types import InlineQueryResultGame`
- `from aiogram.api.types.inline_query_result_game import InlineQueryResultGame`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultgame)
- [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md)

View file

@ -0,0 +1,37 @@
# InlineQueryResultGif
## Description
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.
## Attributes
| Name | Type | Description |
| - | - | - |
| `type` | `#!python str` | Type of the result, must be gif |
| `id` | `#!python str` | Unique identifier for this result, 1-64 bytes |
| `gif_url` | `#!python str` | A valid URL for the GIF file. File size must not exceed 1MB |
| `thumb_url` | `#!python str` | URL of the static thumbnail for the result (jpeg or gif) |
| `gif_width` | `#!python Optional[int]` | Optional. Width of the GIF |
| `gif_height` | `#!python Optional[int]` | Optional. Height of the GIF |
| `gif_duration` | `#!python Optional[int]` | Optional. Duration of the GIF |
| `title` | `#!python Optional[str]` | Optional. Title for the result |
| `caption` | `#!python Optional[str]` | Optional. Caption of the GIF file to be sent, 0-1024 characters |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the GIF animation |
## Location
- `from aiogram.types import InlineQueryResultGif`
- `from aiogram.api.types import InlineQueryResultGif`
- `from aiogram.api.types.inline_query_result_gif import InlineQueryResultGif`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultgif)
- [aiogram.types.InputMessageContent](../types/input_message_content.md)
- [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md)

View file

@ -0,0 +1,38 @@
# InlineQueryResultLocation
## Description
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.
## Attributes
| Name | Type | Description |
| - | - | - |
| `type` | `#!python str` | Type of the result, must be location |
| `id` | `#!python str` | Unique identifier for this result, 1-64 Bytes |
| `latitude` | `#!python float` | Location latitude in degrees |
| `longitude` | `#!python float` | Location longitude in degrees |
| `title` | `#!python str` | Location title |
| `live_period` | `#!python Optional[int]` | Optional. Period in seconds for which the location can be updated, should be between 60 and 86400. |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the location |
| `thumb_url` | `#!python Optional[str]` | Optional. Url of the thumbnail for the result |
| `thumb_width` | `#!python Optional[int]` | Optional. Thumbnail width |
| `thumb_height` | `#!python Optional[int]` | Optional. Thumbnail height |
## Location
- `from aiogram.types import InlineQueryResultLocation`
- `from aiogram.api.types import InlineQueryResultLocation`
- `from aiogram.api.types.inline_query_result_location import InlineQueryResultLocation`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultlocation)
- [aiogram.types.InputMessageContent](../types/input_message_content.md)
- [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md)

View file

@ -0,0 +1,37 @@
# InlineQueryResultMpeg4Gif
## Description
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.
## Attributes
| Name | Type | Description |
| - | - | - |
| `type` | `#!python str` | Type of the result, must be mpeg4_gif |
| `id` | `#!python str` | Unique identifier for this result, 1-64 bytes |
| `mpeg4_url` | `#!python str` | A valid URL for the MP4 file. File size must not exceed 1MB |
| `thumb_url` | `#!python str` | URL of the static thumbnail (jpeg or gif) for the result |
| `mpeg4_width` | `#!python Optional[int]` | Optional. Video width |
| `mpeg4_height` | `#!python Optional[int]` | Optional. Video height |
| `mpeg4_duration` | `#!python Optional[int]` | Optional. Video duration |
| `title` | `#!python Optional[str]` | Optional. Title for the result |
| `caption` | `#!python Optional[str]` | Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the video animation |
## Location
- `from aiogram.types import InlineQueryResultMpeg4Gif`
- `from aiogram.api.types import InlineQueryResultMpeg4Gif`
- `from aiogram.api.types.inline_query_result_mpeg4_gif import InlineQueryResultMpeg4Gif`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultmpeg4gif)
- [aiogram.types.InputMessageContent](../types/input_message_content.md)
- [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md)

View file

@ -0,0 +1,37 @@
# InlineQueryResultPhoto
## Description
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.
## Attributes
| Name | Type | Description |
| - | - | - |
| `type` | `#!python str` | Type of the result, must be photo |
| `id` | `#!python str` | Unique identifier for this result, 1-64 bytes |
| `photo_url` | `#!python str` | A valid URL of the photo. Photo must be in jpeg format. Photo size must not exceed 5MB |
| `thumb_url` | `#!python str` | URL of the thumbnail for the photo |
| `photo_width` | `#!python Optional[int]` | Optional. Width of the photo |
| `photo_height` | `#!python Optional[int]` | Optional. Height of the photo |
| `title` | `#!python Optional[str]` | Optional. Title for the result |
| `description` | `#!python Optional[str]` | Optional. Short description of the result |
| `caption` | `#!python Optional[str]` | Optional. Caption of the photo to be sent, 0-1024 characters |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the photo |
## Location
- `from aiogram.types import InlineQueryResultPhoto`
- `from aiogram.api.types import InlineQueryResultPhoto`
- `from aiogram.api.types.inline_query_result_photo import InlineQueryResultPhoto`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultphoto)
- [aiogram.types.InputMessageContent](../types/input_message_content.md)
- [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md)

View file

@ -0,0 +1,40 @@
# InlineQueryResultVenue
## Description
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.
## Attributes
| Name | Type | Description |
| - | - | - |
| `type` | `#!python str` | Type of the result, must be venue |
| `id` | `#!python str` | Unique identifier for this result, 1-64 Bytes |
| `latitude` | `#!python float` | Latitude of the venue location in degrees |
| `longitude` | `#!python float` | Longitude of the venue location in degrees |
| `title` | `#!python str` | Title of the venue |
| `address` | `#!python str` | Address of the venue |
| `foursquare_id` | `#!python Optional[str]` | Optional. Foursquare identifier of the venue if known |
| `foursquare_type` | `#!python Optional[str]` | Optional. Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.) |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the venue |
| `thumb_url` | `#!python Optional[str]` | Optional. Url of the thumbnail for the result |
| `thumb_width` | `#!python Optional[int]` | Optional. Thumbnail width |
| `thumb_height` | `#!python Optional[int]` | Optional. Thumbnail height |
## Location
- `from aiogram.types import InlineQueryResultVenue`
- `from aiogram.api.types import InlineQueryResultVenue`
- `from aiogram.api.types.inline_query_result_venue import InlineQueryResultVenue`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultvenue)
- [aiogram.types.InputMessageContent](../types/input_message_content.md)
- [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md)

View file

@ -0,0 +1,41 @@
# InlineQueryResultVideo
## Description
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.
## Attributes
| Name | Type | Description |
| - | - | - |
| `type` | `#!python str` | Type of the result, must be video |
| `id` | `#!python str` | Unique identifier for this result, 1-64 bytes |
| `video_url` | `#!python str` | A valid URL for the embedded video player or video file |
| `mime_type` | `#!python str` | Mime type of the content of video url, 'text/html' or 'video/mp4' |
| `thumb_url` | `#!python str` | URL of the thumbnail (jpeg only) for the video |
| `title` | `#!python str` | Title for the result |
| `caption` | `#!python Optional[str]` | Optional. Caption of the video to be sent, 0-1024 characters |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `video_width` | `#!python Optional[int]` | Optional. Video width |
| `video_height` | `#!python Optional[int]` | Optional. Video height |
| `video_duration` | `#!python Optional[int]` | Optional. Video duration in seconds |
| `description` | `#!python Optional[str]` | Optional. Short description of the result |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. 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). |
## Location
- `from aiogram.types import InlineQueryResultVideo`
- `from aiogram.api.types import InlineQueryResultVideo`
- `from aiogram.api.types.inline_query_result_video import InlineQueryResultVideo`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultvideo)
- [aiogram.types.InputMessageContent](../types/input_message_content.md)
- [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md)

View file

@ -0,0 +1,36 @@
# InlineQueryResultVoice
## Description
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.
## Attributes
| Name | Type | Description |
| - | - | - |
| `type` | `#!python str` | Type of the result, must be voice |
| `id` | `#!python str` | Unique identifier for this result, 1-64 bytes |
| `voice_url` | `#!python str` | A valid URL for the voice recording |
| `title` | `#!python str` | Recording title |
| `caption` | `#!python Optional[str]` | Optional. Caption, 0-1024 characters |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `voice_duration` | `#!python Optional[int]` | Optional. Recording duration in seconds |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the voice recording |
## Location
- `from aiogram.types import InlineQueryResultVoice`
- `from aiogram.api.types import InlineQueryResultVoice`
- `from aiogram.api.types.inline_query_result_voice import InlineQueryResultVoice`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultvoice)
- [aiogram.types.InputMessageContent](../types/input_message_content.md)
- [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md)

View file

@ -0,0 +1,27 @@
# InputContactMessageContent
## Description
Represents the content of a contact message to be sent as the result of an inline query.
## Attributes
| Name | Type | Description |
| - | - | - |
| `phone_number` | `#!python str` | Contact's phone number |
| `first_name` | `#!python str` | Contact's first name |
| `last_name` | `#!python Optional[str]` | Optional. Contact's last name |
| `vcard` | `#!python Optional[str]` | Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes |
## Location
- `from aiogram.types import InputContactMessageContent`
- `from aiogram.api.types import InputContactMessageContent`
- `from aiogram.api.types.input_contact_message_content import InputContactMessageContent`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inputcontactmessagecontent)

View file

@ -0,0 +1,18 @@
# InputFile
## Description
This object represents the contents of a file to be uploaded. Must be posted using multipart/form-data in the usual way that files are uploaded via the browser.
## Location
- `from aiogram.types import InputFile`
- `from aiogram.api.types import InputFile`
- `from aiogram.api.types.input_file import InputFile`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inputfile)

View file

@ -0,0 +1,26 @@
# InputLocationMessageContent
## Description
Represents the content of a location message to be sent as the result of an inline query.
## Attributes
| Name | Type | Description |
| - | - | - |
| `latitude` | `#!python float` | Latitude of the location in degrees |
| `longitude` | `#!python float` | Longitude of the location in degrees |
| `live_period` | `#!python Optional[int]` | Optional. Period in seconds for which the location can be updated, should be between 60 and 86400. |
## Location
- `from aiogram.types import InputLocationMessageContent`
- `from aiogram.api.types import InputLocationMessageContent`
- `from aiogram.api.types.input_location_message_content import InputLocationMessageContent`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inputlocationmessagecontent)

View file

@ -0,0 +1,28 @@
# InputMedia
## Description
This object represents the content of a media message to be sent. It should be one of
- InputMediaAnimation
- InputMediaDocument
- InputMediaAudio
- InputMediaPhoto
- InputMediaVideo
## Location
- `from aiogram.types import InputMedia`
- `from aiogram.api.types import InputMedia`
- `from aiogram.api.types.input_media import InputMedia`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inputmedia)

View file

@ -0,0 +1,32 @@
# InputMediaAnimation
## Description
Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.
## Attributes
| Name | Type | Description |
| - | - | - |
| `type` | `#!python str` | Type of the result, must be animation |
| `media` | `#!python Union[str, InputFile]` | File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name. |
| `thumb` | `#!python Optional[Union[InputFile, str]]` | Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnails width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails cant be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. |
| `caption` | `#!python Optional[str]` | Optional. Caption of the animation to be sent, 0-1024 characters |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `width` | `#!python Optional[int]` | Optional. Animation width |
| `height` | `#!python Optional[int]` | Optional. Animation height |
| `duration` | `#!python Optional[int]` | Optional. Animation duration |
## Location
- `from aiogram.types import InputMediaAnimation`
- `from aiogram.api.types import InputMediaAnimation`
- `from aiogram.api.types.input_media_animation import InputMediaAnimation`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inputmediaanimation)
- [aiogram.types.InputFile](../types/input_file.md)

View file

@ -0,0 +1,32 @@
# InputMediaAudio
## Description
Represents an audio file to be treated as music to be sent.
## Attributes
| Name | Type | Description |
| - | - | - |
| `type` | `#!python str` | Type of the result, must be audio |
| `media` | `#!python Union[str, InputFile]` | File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name. |
| `thumb` | `#!python Optional[Union[InputFile, str]]` | Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnails width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails cant be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. |
| `caption` | `#!python Optional[str]` | Optional. Caption of the audio to be sent, 0-1024 characters |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `duration` | `#!python Optional[int]` | Optional. Duration of the audio in seconds |
| `performer` | `#!python Optional[str]` | Optional. Performer of the audio |
| `title` | `#!python Optional[str]` | Optional. Title of the audio |
## Location
- `from aiogram.types import InputMediaAudio`
- `from aiogram.api.types import InputMediaAudio`
- `from aiogram.api.types.input_media_audio import InputMediaAudio`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inputmediaaudio)
- [aiogram.types.InputFile](../types/input_file.md)

View file

@ -0,0 +1,29 @@
# InputMediaDocument
## Description
Represents a general file to be sent.
## Attributes
| Name | Type | Description |
| - | - | - |
| `type` | `#!python str` | Type of the result, must be document |
| `media` | `#!python Union[str, InputFile]` | File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name. |
| `thumb` | `#!python Optional[Union[InputFile, str]]` | Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnails width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails cant be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. |
| `caption` | `#!python Optional[str]` | Optional. Caption of the document to be sent, 0-1024 characters |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
## Location
- `from aiogram.types import InputMediaDocument`
- `from aiogram.api.types import InputMediaDocument`
- `from aiogram.api.types.input_media_document import InputMediaDocument`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inputmediadocument)
- [aiogram.types.InputFile](../types/input_file.md)

View file

@ -0,0 +1,28 @@
# InputMediaPhoto
## Description
Represents a photo to be sent.
## Attributes
| Name | Type | Description |
| - | - | - |
| `type` | `#!python str` | Type of the result, must be photo |
| `media` | `#!python Union[str, InputFile]` | File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name. |
| `caption` | `#!python Optional[str]` | Optional. Caption of the photo to be sent, 0-1024 characters |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
## Location
- `from aiogram.types import InputMediaPhoto`
- `from aiogram.api.types import InputMediaPhoto`
- `from aiogram.api.types.input_media_photo import InputMediaPhoto`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inputmediaphoto)
- [aiogram.types.InputFile](../types/input_file.md)

View file

@ -0,0 +1,33 @@
# InputMediaVideo
## Description
Represents a video to be sent.
## Attributes
| Name | Type | Description |
| - | - | - |
| `type` | `#!python str` | Type of the result, must be video |
| `media` | `#!python Union[str, InputFile]` | File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name. |
| `thumb` | `#!python Optional[Union[InputFile, str]]` | Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnails width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails cant be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. |
| `caption` | `#!python Optional[str]` | Optional. Caption of the video to be sent, 0-1024 characters |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `width` | `#!python Optional[int]` | Optional. Video width |
| `height` | `#!python Optional[int]` | Optional. Video height |
| `duration` | `#!python Optional[int]` | Optional. Video duration |
| `supports_streaming` | `#!python Optional[bool]` | Optional. Pass True, if the uploaded video is suitable for streaming |
## Location
- `from aiogram.types import InputMediaVideo`
- `from aiogram.api.types import InputMediaVideo`
- `from aiogram.api.types.input_media_video import InputMediaVideo`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inputmediavideo)
- [aiogram.types.InputFile](../types/input_file.md)

View file

@ -0,0 +1,26 @@
# InputMessageContent
## Description
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:
- InputTextMessageContent
- InputLocationMessageContent
- InputVenueMessageContent
- InputContactMessageContent
## Location
- `from aiogram.types import InputMessageContent`
- `from aiogram.api.types import InputMessageContent`
- `from aiogram.api.types.input_message_content import InputMessageContent`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inputmessagecontent)

View file

@ -0,0 +1,26 @@
# InputTextMessageContent
## Description
Represents the content of a text message to be sent as the result of an inline query.
## Attributes
| Name | Type | Description |
| - | - | - |
| `message_text` | `#!python str` | Text of the message to be sent, 1-4096 characters |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. |
| `disable_web_page_preview` | `#!python Optional[bool]` | Optional. Disables link previews for links in the sent message |
## Location
- `from aiogram.types import InputTextMessageContent`
- `from aiogram.api.types import InputTextMessageContent`
- `from aiogram.api.types.input_text_message_content import InputTextMessageContent`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inputtextmessagecontent)

View file

@ -0,0 +1,29 @@
# InputVenueMessageContent
## Description
Represents the content of a venue message to be sent as the result of an inline query.
## Attributes
| Name | Type | Description |
| - | - | - |
| `latitude` | `#!python float` | Latitude of the venue in degrees |
| `longitude` | `#!python float` | Longitude of the venue in degrees |
| `title` | `#!python str` | Name of the venue |
| `address` | `#!python str` | Address of the venue |
| `foursquare_id` | `#!python Optional[str]` | Optional. Foursquare identifier of the venue, if known |
| `foursquare_type` | `#!python Optional[str]` | Optional. Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.) |
## Location
- `from aiogram.types import InputVenueMessageContent`
- `from aiogram.api.types import InputVenueMessageContent`
- `from aiogram.api.types.input_venue_message_content import InputVenueMessageContent`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#inputvenuemessagecontent)

28
docs/api/types/invoice.md Normal file
View file

@ -0,0 +1,28 @@
# Invoice
## Description
This object contains basic information about an invoice.
## Attributes
| Name | Type | Description |
| - | - | - |
| `title` | `#!python str` | Product name |
| `description` | `#!python str` | Product description |
| `start_parameter` | `#!python str` | Unique bot deep-linking parameter that can be used to generate this invoice |
| `currency` | `#!python str` | Three-letter ISO 4217 currency code |
| `total_amount` | `#!python int` | Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). |
## Location
- `from aiogram.types import Invoice`
- `from aiogram.api.types import Invoice`
- `from aiogram.api.types.invoice import Invoice`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#invoice)

View file

@ -0,0 +1,28 @@
# KeyboardButton
## Description
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.
Note: request_contact and request_location options will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
## Attributes
| Name | Type | Description |
| - | - | - |
| `text` | `#!python str` | Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed |
| `request_contact` | `#!python Optional[bool]` | Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only |
| `request_location` | `#!python Optional[bool]` | Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only |
## Location
- `from aiogram.types import KeyboardButton`
- `from aiogram.api.types import KeyboardButton`
- `from aiogram.api.types.keyboard_button import KeyboardButton`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#keyboardbutton)

View file

@ -0,0 +1,25 @@
# LabeledPrice
## Description
This object represents a portion of the price for goods or services.
## Attributes
| Name | Type | Description |
| - | - | - |
| `label` | `#!python str` | Portion label |
| `amount` | `#!python int` | Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). |
## Location
- `from aiogram.types import LabeledPrice`
- `from aiogram.api.types import LabeledPrice`
- `from aiogram.api.types.labeled_price import LabeledPrice`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#labeledprice)

View file

@ -0,0 +1,25 @@
# Location
## Description
This object represents a point on the map.
## Attributes
| Name | Type | Description |
| - | - | - |
| `longitude` | `#!python float` | Longitude as defined by sender |
| `latitude` | `#!python float` | Latitude as defined by sender |
## Location
- `from aiogram.types import Location`
- `from aiogram.api.types import Location`
- `from aiogram.api.types.location import Location`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#location)

View file

@ -0,0 +1,31 @@
# LoginUrl
## Description
This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in:
Telegram apps support these buttons as of version 5.7.
Sample bot: @discussbot
## Attributes
| Name | Type | Description |
| - | - | - |
| `url` | `#!python str` | An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data. |
| `forward_text` | `#!python Optional[str]` | Optional. New text of the button in forwarded messages. |
| `bot_username` | `#!python Optional[str]` | Optional. Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details. |
| `request_write_access` | `#!python Optional[bool]` | Optional. Pass True to request the permission for your bot to send messages to the user. |
## Location
- `from aiogram.types import LoginUrl`
- `from aiogram.api.types import LoginUrl`
- `from aiogram.api.types.login_url import LoginUrl`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#loginurl)

View file

@ -0,0 +1,27 @@
# MaskPosition
## Description
This object describes the position on faces where a mask should be placed by default.
## Attributes
| Name | Type | Description |
| - | - | - |
| `point` | `#!python str` | The part of the face relative to which the mask should be placed. One of 'forehead', 'eyes', 'mouth', or 'chin'. |
| `x_shift` | `#!python float` | Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position. |
| `y_shift` | `#!python float` | Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position. |
| `scale` | `#!python float` | Mask scaling coefficient. For example, 2.0 means double size. |
## Location
- `from aiogram.types import MaskPosition`
- `from aiogram.api.types import MaskPosition`
- `from aiogram.api.types.mask_position import MaskPosition`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#maskposition)

90
docs/api/types/message.md Normal file
View file

@ -0,0 +1,90 @@
# Message
## Description
This object represents a message.
## Attributes
| Name | Type | Description |
| - | - | - |
| `message_id` | `#!python int` | Unique message identifier inside this chat |
| `date` | `#!python datetime.datetime` | Date the message was sent in Unix time |
| `chat` | `#!python Chat` | Conversation the message belongs to |
| `from_user` | `#!python Optional[User]` | Optional. Sender, empty for messages sent to channels |
| `forward_from` | `#!python Optional[User]` | Optional. For forwarded messages, sender of the original message |
| `forward_from_chat` | `#!python Optional[Chat]` | Optional. For messages forwarded from channels, information about the original channel |
| `forward_from_message_id` | `#!python Optional[int]` | Optional. For messages forwarded from channels, identifier of the original message in the channel |
| `forward_signature` | `#!python Optional[str]` | Optional. For messages forwarded from channels, signature of the post author if present |
| `forward_sender_name` | `#!python Optional[str]` | Optional. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages |
| `forward_date` | `#!python Optional[int]` | Optional. For forwarded messages, date the original message was sent in Unix time |
| `reply_to_message` | `#!python Optional[Message]` | Optional. For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply. |
| `edit_date` | `#!python Optional[int]` | Optional. Date the message was last edited in Unix time |
| `media_group_id` | `#!python Optional[str]` | Optional. The unique identifier of a media message group this message belongs to |
| `author_signature` | `#!python Optional[str]` | Optional. Signature of the post author for messages in channels |
| `text` | `#!python Optional[str]` | Optional. For text messages, the actual UTF-8 text of the message, 0-4096 characters. |
| `entities` | `#!python Optional[List[MessageEntity]]` | Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text |
| `caption_entities` | `#!python Optional[List[MessageEntity]]` | Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption |
| `audio` | `#!python Optional[Audio]` | Optional. Message is an audio file, information about the file |
| `document` | `#!python Optional[Document]` | Optional. Message is a general file, information about the file |
| `animation` | `#!python Optional[Animation]` | Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set |
| `game` | `#!python Optional[Game]` | Optional. Message is a game, information about the game. |
| `photo` | `#!python Optional[List[PhotoSize]]` | Optional. Message is a photo, available sizes of the photo |
| `sticker` | `#!python Optional[Sticker]` | Optional. Message is a sticker, information about the sticker |
| `video` | `#!python Optional[Video]` | Optional. Message is a video, information about the video |
| `voice` | `#!python Optional[Voice]` | Optional. Message is a voice message, information about the file |
| `video_note` | `#!python Optional[VideoNote]` | Optional. Message is a video note, information about the video message |
| `caption` | `#!python Optional[str]` | Optional. Caption for the animation, audio, document, photo, video or voice, 0-1024 characters |
| `contact` | `#!python Optional[Contact]` | Optional. Message is a shared contact, information about the contact |
| `location` | `#!python Optional[Location]` | Optional. Message is a shared location, information about the location |
| `venue` | `#!python Optional[Venue]` | Optional. Message is a venue, information about the venue |
| `poll` | `#!python Optional[Poll]` | Optional. Message is a native poll, information about the poll |
| `new_chat_members` | `#!python Optional[List[User]]` | Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members) |
| `left_chat_member` | `#!python Optional[User]` | Optional. A member was removed from the group, information about them (this member may be the bot itself) |
| `new_chat_title` | `#!python Optional[str]` | Optional. A chat title was changed to this value |
| `new_chat_photo` | `#!python Optional[List[PhotoSize]]` | Optional. A chat photo was change to this value |
| `delete_chat_photo` | `#!python Optional[bool]` | Optional. Service message: the chat photo was deleted |
| `group_chat_created` | `#!python Optional[bool]` | Optional. Service message: the group has been created |
| `supergroup_chat_created` | `#!python Optional[bool]` | Optional. Service message: the supergroup has been created. This field cant be received in a message coming through updates, because bot cant be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup. |
| `channel_chat_created` | `#!python Optional[bool]` | Optional. Service message: the channel has been created. This field cant be received in a message coming through updates, because bot cant be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel. |
| `migrate_to_chat_id` | `#!python Optional[int]` | Optional. The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. |
| `migrate_from_chat_id` | `#!python Optional[int]` | Optional. The supergroup has been migrated from a group with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. |
| `pinned_message` | `#!python Optional[Message]` | Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply. |
| `invoice` | `#!python Optional[Invoice]` | Optional. Message is an invoice for a payment, information about the invoice. |
| `successful_payment` | `#!python Optional[SuccessfulPayment]` | Optional. Message is a service message about a successful payment, information about the payment. |
| `connected_website` | `#!python Optional[str]` | Optional. The domain name of the website on which the user has logged in. |
| `passport_data` | `#!python Optional[PassportData]` | Optional. Telegram Passport data |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons. |
## Location
- `from aiogram.types import Message`
- `from aiogram.api.types import Message`
- `from aiogram.api.types.message import Message`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#message)
- [aiogram.types.Poll](../types/poll.md)
- [aiogram.types.PassportData](../types/passport_data.md)
- [aiogram.types.Video](../types/video.md)
- [aiogram.types.MessageEntity](../types/message_entity.md)
- [aiogram.types.PhotoSize](../types/photo_size.md)
- [aiogram.types.Contact](../types/contact.md)
- [aiogram.types.Document](../types/document.md)
- [aiogram.types.Animation](../types/animation.md)
- [aiogram.types.SuccessfulPayment](../types/successful_payment.md)
- [aiogram.types.Chat](../types/chat.md)
- [aiogram.types.Audio](../types/audio.md)
- [aiogram.types.Game](../types/game.md)
- [aiogram.types.Voice](../types/voice.md)
- [aiogram.types.VideoNote](../types/video_note.md)
- [aiogram.types.Invoice](../types/invoice.md)
- [aiogram.types.Location](../types/location.md)
- [aiogram.types.Sticker](../types/sticker.md)
- [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md)
- [aiogram.types.User](../types/user.md)
- [aiogram.types.Venue](../types/venue.md)

View file

@ -0,0 +1,29 @@
# MessageEntity
## Description
This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.
## Attributes
| Name | Type | Description |
| - | - | - |
| `type` | `#!python str` | Type of the entity. Can be mention (@username), hashtag, cashtag, bot_command, url, email, phone_number, bold (bold text), italic (italic text), code (monowidth string), pre (monowidth block), text_link (for clickable text URLs), text_mention (for users without usernames) |
| `offset` | `#!python int` | Offset in UTF-16 code units to the start of the entity |
| `length` | `#!python int` | Length of the entity in UTF-16 code units |
| `url` | `#!python Optional[str]` | Optional. For 'text_link' only, url that will be opened after user taps on the text |
| `user` | `#!python Optional[User]` | Optional. For 'text_mention' only, the mentioned user |
## Location
- `from aiogram.types import MessageEntity`
- `from aiogram.api.types import MessageEntity`
- `from aiogram.api.types.message_entity import MessageEntity`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#messageentity)
- [aiogram.types.User](../types/user.md)

View file

@ -0,0 +1,28 @@
# OrderInfo
## Description
This object represents information about an order.
## Attributes
| Name | Type | Description |
| - | - | - |
| `name` | `#!python Optional[str]` | Optional. User name |
| `phone_number` | `#!python Optional[str]` | Optional. User's phone number |
| `email` | `#!python Optional[str]` | Optional. User email |
| `shipping_address` | `#!python Optional[ShippingAddress]` | Optional. User shipping address |
## Location
- `from aiogram.types import OrderInfo`
- `from aiogram.api.types import OrderInfo`
- `from aiogram.api.types.order_info import OrderInfo`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#orderinfo)
- [aiogram.types.ShippingAddress](../types/shipping_address.md)

View file

@ -0,0 +1,27 @@
# PassportData
## Description
Contains information about Telegram Passport data shared with the bot by the user.
## Attributes
| Name | Type | Description |
| - | - | - |
| `data` | `#!python List[EncryptedPassportElement]` | Array with information about documents and other Telegram Passport elements that was shared with the bot |
| `credentials` | `#!python EncryptedCredentials` | Encrypted credentials required to decrypt the data |
## Location
- `from aiogram.types import PassportData`
- `from aiogram.api.types import PassportData`
- `from aiogram.api.types.passport_data import PassportData`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#passportdata)
- [aiogram.types.EncryptedPassportElement](../types/encrypted_passport_element.md)
- [aiogram.types.EncryptedCredentials](../types/encrypted_credentials.md)

View file

@ -0,0 +1,36 @@
# PassportElementError
## Description
This object represents an error in the Telegram Passport element which was submitted that should be resolved by the user. It should be one of:
- PassportElementErrorDataField
- PassportElementErrorFrontSide
- PassportElementErrorReverseSide
- PassportElementErrorSelfie
- PassportElementErrorFile
- PassportElementErrorFiles
- PassportElementErrorTranslationFile
- PassportElementErrorTranslationFiles
- PassportElementErrorUnspecified
## Location
- `from aiogram.types import PassportElementError`
- `from aiogram.api.types import PassportElementError`
- `from aiogram.api.types.passport_element_error import PassportElementError`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#passportelementerror)

View file

@ -0,0 +1,28 @@
# PassportElementErrorDataField
## Description
Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes.
## Attributes
| Name | Type | Description |
| - | - | - |
| `source` | `#!python str` | Error source, must be data |
| `type` | `#!python str` | The section of the user's Telegram Passport which has the error, one of 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport', 'address' |
| `field_name` | `#!python str` | Name of the data field which has the error |
| `data_hash` | `#!python str` | Base64-encoded data hash |
| `message` | `#!python str` | Error message |
## Location
- `from aiogram.types import PassportElementErrorDataField`
- `from aiogram.api.types import PassportElementErrorDataField`
- `from aiogram.api.types.passport_element_error_data_field import PassportElementErrorDataField`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#passportelementerrordatafield)

View file

@ -0,0 +1,27 @@
# PassportElementErrorFile
## Description
Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.
## Attributes
| Name | Type | Description |
| - | - | - |
| `source` | `#!python str` | Error source, must be file |
| `type` | `#!python str` | The section of the user's Telegram Passport which has the issue, one of 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration' |
| `file_hash` | `#!python str` | Base64-encoded file hash |
| `message` | `#!python str` | Error message |
## Location
- `from aiogram.types import PassportElementErrorFile`
- `from aiogram.api.types import PassportElementErrorFile`
- `from aiogram.api.types.passport_element_error_file import PassportElementErrorFile`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#passportelementerrorfile)

View file

@ -0,0 +1,27 @@
# PassportElementErrorFiles
## Description
Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.
## Attributes
| Name | Type | Description |
| - | - | - |
| `source` | `#!python str` | Error source, must be files |
| `type` | `#!python str` | The section of the user's Telegram Passport which has the issue, one of 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration' |
| `file_hashes` | `#!python List[str]` | List of base64-encoded file hashes |
| `message` | `#!python str` | Error message |
## Location
- `from aiogram.types import PassportElementErrorFiles`
- `from aiogram.api.types import PassportElementErrorFiles`
- `from aiogram.api.types.passport_element_error_files import PassportElementErrorFiles`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#passportelementerrorfiles)

View file

@ -0,0 +1,27 @@
# PassportElementErrorFrontSide
## Description
Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.
## Attributes
| Name | Type | Description |
| - | - | - |
| `source` | `#!python str` | Error source, must be front_side |
| `type` | `#!python str` | The section of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport' |
| `file_hash` | `#!python str` | Base64-encoded hash of the file with the front side of the document |
| `message` | `#!python str` | Error message |
## Location
- `from aiogram.types import PassportElementErrorFrontSide`
- `from aiogram.api.types import PassportElementErrorFrontSide`
- `from aiogram.api.types.passport_element_error_front_side import PassportElementErrorFrontSide`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#passportelementerrorfrontside)

View file

@ -0,0 +1,27 @@
# PassportElementErrorReverseSide
## Description
Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.
## Attributes
| Name | Type | Description |
| - | - | - |
| `source` | `#!python str` | Error source, must be reverse_side |
| `type` | `#!python str` | The section of the user's Telegram Passport which has the issue, one of 'driver_license', 'identity_card' |
| `file_hash` | `#!python str` | Base64-encoded hash of the file with the reverse side of the document |
| `message` | `#!python str` | Error message |
## Location
- `from aiogram.types import PassportElementErrorReverseSide`
- `from aiogram.api.types import PassportElementErrorReverseSide`
- `from aiogram.api.types.passport_element_error_reverse_side import PassportElementErrorReverseSide`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#passportelementerrorreverseside)

View file

@ -0,0 +1,27 @@
# PassportElementErrorSelfie
## Description
Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.
## Attributes
| Name | Type | Description |
| - | - | - |
| `source` | `#!python str` | Error source, must be selfie |
| `type` | `#!python str` | The section of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport' |
| `file_hash` | `#!python str` | Base64-encoded hash of the file with the selfie |
| `message` | `#!python str` | Error message |
## Location
- `from aiogram.types import PassportElementErrorSelfie`
- `from aiogram.api.types import PassportElementErrorSelfie`
- `from aiogram.api.types.passport_element_error_selfie import PassportElementErrorSelfie`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#passportelementerrorselfie)

View file

@ -0,0 +1,27 @@
# PassportElementErrorTranslationFile
## Description
Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.
## Attributes
| Name | Type | Description |
| - | - | - |
| `source` | `#!python str` | Error source, must be translation_file |
| `type` | `#!python str` | Type of element of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration' |
| `file_hash` | `#!python str` | Base64-encoded file hash |
| `message` | `#!python str` | Error message |
## Location
- `from aiogram.types import PassportElementErrorTranslationFile`
- `from aiogram.api.types import PassportElementErrorTranslationFile`
- `from aiogram.api.types.passport_element_error_translation_file import PassportElementErrorTranslationFile`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#passportelementerrortranslationfile)

View file

@ -0,0 +1,27 @@
# PassportElementErrorTranslationFiles
## Description
Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change.
## Attributes
| Name | Type | Description |
| - | - | - |
| `source` | `#!python str` | Error source, must be translation_files |
| `type` | `#!python str` | Type of element of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration' |
| `file_hashes` | `#!python List[str]` | List of base64-encoded file hashes |
| `message` | `#!python str` | Error message |
## Location
- `from aiogram.types import PassportElementErrorTranslationFiles`
- `from aiogram.api.types import PassportElementErrorTranslationFiles`
- `from aiogram.api.types.passport_element_error_translation_files import PassportElementErrorTranslationFiles`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#passportelementerrortranslationfiles)

View file

@ -0,0 +1,27 @@
# PassportElementErrorUnspecified
## Description
Represents an issue in an unspecified place. The error is considered resolved when new data is added.
## Attributes
| Name | Type | Description |
| - | - | - |
| `source` | `#!python str` | Error source, must be unspecified |
| `type` | `#!python str` | Type of element of the user's Telegram Passport which has the issue |
| `element_hash` | `#!python str` | Base64-encoded element hash |
| `message` | `#!python str` | Error message |
## Location
- `from aiogram.types import PassportElementErrorUnspecified`
- `from aiogram.api.types import PassportElementErrorUnspecified`
- `from aiogram.api.types.passport_element_error_unspecified import PassportElementErrorUnspecified`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#passportelementerrorunspecified)

View file

@ -0,0 +1,26 @@
# PassportFile
## Description
This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB.
## Attributes
| Name | Type | Description |
| - | - | - |
| `file_id` | `#!python str` | Identifier for this file |
| `file_size` | `#!python int` | File size |
| `file_date` | `#!python int` | Unix time when the file was uploaded |
## Location
- `from aiogram.types import PassportFile`
- `from aiogram.api.types import PassportFile`
- `from aiogram.api.types.passport_file import PassportFile`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#passportfile)

View file

@ -0,0 +1,27 @@
# PhotoSize
## Description
This object represents one size of a photo or a file / sticker thumbnail.
## Attributes
| Name | Type | Description |
| - | - | - |
| `file_id` | `#!python str` | Identifier for this file |
| `width` | `#!python int` | Photo width |
| `height` | `#!python int` | Photo height |
| `file_size` | `#!python Optional[int]` | Optional. File size |
## Location
- `from aiogram.types import PhotoSize`
- `from aiogram.api.types import PhotoSize`
- `from aiogram.api.types.photo_size import PhotoSize`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#photosize)

28
docs/api/types/poll.md Normal file
View file

@ -0,0 +1,28 @@
# Poll
## Description
This object contains information about a poll.
## Attributes
| Name | Type | Description |
| - | - | - |
| `id` | `#!python str` | Unique poll identifier |
| `question` | `#!python str` | Poll question, 1-255 characters |
| `options` | `#!python List[PollOption]` | List of poll options |
| `is_closed` | `#!python bool` | True, if the poll is closed |
## Location
- `from aiogram.types import Poll`
- `from aiogram.api.types import Poll`
- `from aiogram.api.types.poll import Poll`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#poll)
- [aiogram.types.PollOption](../types/poll_option.md)

View file

@ -0,0 +1,25 @@
# PollOption
## Description
This object contains information about one answer option in a poll.
## Attributes
| Name | Type | Description |
| - | - | - |
| `text` | `#!python str` | Option text, 1-100 characters |
| `voter_count` | `#!python int` | Number of users that voted for this option |
## Location
- `from aiogram.types import PollOption`
- `from aiogram.api.types import PollOption`
- `from aiogram.api.types.poll_option import PollOption`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#polloption)

View file

@ -0,0 +1,32 @@
# PreCheckoutQuery
## Description
This object contains information about an incoming pre-checkout query.
## Attributes
| Name | Type | Description |
| - | - | - |
| `id` | `#!python str` | Unique query identifier |
| `from_user` | `#!python User` | User who sent the query |
| `currency` | `#!python str` | Three-letter ISO 4217 currency code |
| `total_amount` | `#!python int` | Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). |
| `invoice_payload` | `#!python str` | Bot specified invoice payload |
| `shipping_option_id` | `#!python Optional[str]` | Optional. Identifier of the shipping option chosen by the user |
| `order_info` | `#!python Optional[OrderInfo]` | Optional. Order info provided by the user |
## Location
- `from aiogram.types import PreCheckoutQuery`
- `from aiogram.api.types import PreCheckoutQuery`
- `from aiogram.api.types.pre_checkout_query import PreCheckoutQuery`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#precheckoutquery)
- [aiogram.types.OrderInfo](../types/order_info.md)
- [aiogram.types.User](../types/user.md)

View file

@ -0,0 +1,28 @@
# ReplyKeyboardMarkup
## Description
This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).
## Attributes
| Name | Type | Description |
| - | - | - |
| `keyboard` | `#!python List[List[KeyboardButton]]` | Array of button rows, each represented by an Array of KeyboardButton objects |
| `resize_keyboard` | `#!python Optional[bool]` | Optional. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard. |
| `one_time_keyboard` | `#!python Optional[bool]` | Optional. Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat the user can press a special button in the input field to see the custom keyboard again. Defaults to false. |
| `selective` | `#!python Optional[bool]` | Optional. Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message. |
## Location
- `from aiogram.types import ReplyKeyboardMarkup`
- `from aiogram.api.types import ReplyKeyboardMarkup`
- `from aiogram.api.types.reply_keyboard_markup import ReplyKeyboardMarkup`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#replykeyboardmarkup)
- [aiogram.types.KeyboardButton](../types/keyboard_button.md)

View file

@ -0,0 +1,25 @@
# ReplyKeyboardRemove
## Description
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 (see ReplyKeyboardMarkup).
## Attributes
| Name | Type | Description |
| - | - | - |
| `remove_keyboard` | `#!python bool` | Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup) |
| `selective` | `#!python Optional[bool]` | Optional. Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message. |
## Location
- `from aiogram.types import ReplyKeyboardRemove`
- `from aiogram.api.types import ReplyKeyboardRemove`
- `from aiogram.api.types.reply_keyboard_remove import ReplyKeyboardRemove`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#replykeyboardremove)

View file

@ -0,0 +1,25 @@
# ResponseParameters
## Description
Contains information about why a request was unsuccessful.
## Attributes
| Name | Type | Description |
| - | - | - |
| `migrate_to_chat_id` | `#!python Optional[int]` | Optional. The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. |
| `retry_after` | `#!python Optional[int]` | Optional. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated |
## Location
- `from aiogram.types import ResponseParameters`
- `from aiogram.api.types import ResponseParameters`
- `from aiogram.api.types.response_parameters import ResponseParameters`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#responseparameters)

View file

@ -0,0 +1,29 @@
# ShippingAddress
## Description
This object represents a shipping address.
## Attributes
| Name | Type | Description |
| - | - | - |
| `country_code` | `#!python str` | ISO 3166-1 alpha-2 country code |
| `state` | `#!python str` | State, if applicable |
| `city` | `#!python str` | City |
| `street_line1` | `#!python str` | First line for the address |
| `street_line2` | `#!python str` | Second line for the address |
| `post_code` | `#!python str` | Address post code |
## Location
- `from aiogram.types import ShippingAddress`
- `from aiogram.api.types import ShippingAddress`
- `from aiogram.api.types.shipping_address import ShippingAddress`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#shippingaddress)

View file

@ -0,0 +1,27 @@
# ShippingOption
## Description
This object represents one shipping option.
## Attributes
| Name | Type | Description |
| - | - | - |
| `id` | `#!python str` | Shipping option identifier |
| `title` | `#!python str` | Option title |
| `prices` | `#!python List[LabeledPrice]` | List of price portions |
## Location
- `from aiogram.types import ShippingOption`
- `from aiogram.api.types import ShippingOption`
- `from aiogram.api.types.shipping_option import ShippingOption`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#shippingoption)
- [aiogram.types.LabeledPrice](../types/labeled_price.md)

View file

@ -0,0 +1,29 @@
# ShippingQuery
## Description
This object contains information about an incoming shipping query.
## Attributes
| Name | Type | Description |
| - | - | - |
| `id` | `#!python str` | Unique query identifier |
| `from_user` | `#!python User` | User who sent the query |
| `invoice_payload` | `#!python str` | Bot specified invoice payload |
| `shipping_address` | `#!python ShippingAddress` | User specified shipping address |
## Location
- `from aiogram.types import ShippingQuery`
- `from aiogram.api.types import ShippingQuery`
- `from aiogram.api.types.shipping_query import ShippingQuery`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#shippingquery)
- [aiogram.types.ShippingAddress](../types/shipping_address.md)
- [aiogram.types.User](../types/user.md)

34
docs/api/types/sticker.md Normal file
View file

@ -0,0 +1,34 @@
# Sticker
## Description
This object represents a sticker.
## Attributes
| Name | Type | Description |
| - | - | - |
| `file_id` | `#!python str` | Identifier for this file |
| `width` | `#!python int` | Sticker width |
| `height` | `#!python int` | Sticker height |
| `is_animated` | `#!python bool` | True, if the sticker is animated |
| `thumb` | `#!python Optional[PhotoSize]` | Optional. Sticker thumbnail in the .webp or .jpg format |
| `emoji` | `#!python Optional[str]` | Optional. Emoji associated with the sticker |
| `set_name` | `#!python Optional[str]` | Optional. Name of the sticker set to which the sticker belongs |
| `mask_position` | `#!python Optional[MaskPosition]` | Optional. For mask stickers, the position where the mask should be placed |
| `file_size` | `#!python Optional[int]` | Optional. File size |
## Location
- `from aiogram.types import Sticker`
- `from aiogram.api.types import Sticker`
- `from aiogram.api.types.sticker import Sticker`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#sticker)
- [aiogram.types.MaskPosition](../types/mask_position.md)
- [aiogram.types.PhotoSize](../types/photo_size.md)

View file

@ -0,0 +1,29 @@
# StickerSet
## Description
This object represents a sticker set.
## Attributes
| Name | Type | Description |
| - | - | - |
| `name` | `#!python str` | Sticker set name |
| `title` | `#!python str` | Sticker set title |
| `is_animated` | `#!python bool` | True, if the sticker set contains animated stickers |
| `contains_masks` | `#!python bool` | True, if the sticker set contains masks |
| `stickers` | `#!python List[Sticker]` | List of all set stickers |
## Location
- `from aiogram.types import StickerSet`
- `from aiogram.api.types import StickerSet`
- `from aiogram.api.types.sticker_set import StickerSet`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#stickerset)
- [aiogram.types.Sticker](../types/sticker.md)

View file

@ -0,0 +1,31 @@
# SuccessfulPayment
## Description
This object contains basic information about a successful payment.
## Attributes
| Name | Type | Description |
| - | - | - |
| `currency` | `#!python str` | Three-letter ISO 4217 currency code |
| `total_amount` | `#!python int` | Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). |
| `invoice_payload` | `#!python str` | Bot specified invoice payload |
| `telegram_payment_charge_id` | `#!python str` | Telegram payment identifier |
| `provider_payment_charge_id` | `#!python str` | Provider payment identifier |
| `shipping_option_id` | `#!python Optional[str]` | Optional. Identifier of the shipping option chosen by the user |
| `order_info` | `#!python Optional[OrderInfo]` | Optional. Order info provided by the user |
## Location
- `from aiogram.types import SuccessfulPayment`
- `from aiogram.api.types import SuccessfulPayment`
- `from aiogram.api.types.successful_payment import SuccessfulPayment`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#successfulpayment)
- [aiogram.types.OrderInfo](../types/order_info.md)

43
docs/api/types/update.md Normal file
View file

@ -0,0 +1,43 @@
# Update
## Description
This object represents an incoming update.
At most one of the optional parameters can be present in any given update.
## Attributes
| Name | Type | Description |
| - | - | - |
| `update_id` | `#!python int` | The updates unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if youre using Webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially. |
| `message` | `#!python Optional[Message]` | Optional. New incoming message of any kind — text, photo, sticker, etc. |
| `edited_message` | `#!python Optional[Message]` | Optional. New version of a message that is known to the bot and was edited |
| `channel_post` | `#!python Optional[Message]` | Optional. New incoming channel post of any kind — text, photo, sticker, etc. |
| `edited_channel_post` | `#!python Optional[Message]` | Optional. New version of a channel post that is known to the bot and was edited |
| `inline_query` | `#!python Optional[InlineQuery]` | Optional. New incoming inline query |
| `chosen_inline_result` | `#!python Optional[ChosenInlineResult]` | Optional. The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot. |
| `callback_query` | `#!python Optional[CallbackQuery]` | Optional. New incoming callback query |
| `shipping_query` | `#!python Optional[ShippingQuery]` | Optional. New incoming shipping query. Only for invoices with flexible price |
| `pre_checkout_query` | `#!python Optional[PreCheckoutQuery]` | Optional. New incoming pre-checkout query. Contains full information about checkout |
| `poll` | `#!python Optional[Poll]` | Optional. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot |
## Location
- `from aiogram.types import Update`
- `from aiogram.api.types import Update`
- `from aiogram.api.types.update import Update`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#update)
- [aiogram.types.Poll](../types/poll.md)
- [aiogram.types.CallbackQuery](../types/callback_query.md)
- [aiogram.types.InlineQuery](../types/inline_query.md)
- [aiogram.types.ChosenInlineResult](../types/chosen_inline_result.md)
- [aiogram.types.Message](../types/message.md)
- [aiogram.types.ShippingQuery](../types/shipping_query.md)
- [aiogram.types.PreCheckoutQuery](../types/pre_checkout_query.md)

29
docs/api/types/user.md Normal file
View file

@ -0,0 +1,29 @@
# User
## Description
This object represents a Telegram user or bot.
## Attributes
| Name | Type | Description |
| - | - | - |
| `id` | `#!python int` | Unique identifier for this user or bot |
| `is_bot` | `#!python bool` | True, if this user is a bot |
| `first_name` | `#!python str` | Users or bots first name |
| `last_name` | `#!python Optional[str]` | Optional. Users or bots last name |
| `username` | `#!python Optional[str]` | Optional. Users or bots username |
| `language_code` | `#!python Optional[str]` | Optional. IETF language tag of the user's language |
## Location
- `from aiogram.types import User`
- `from aiogram.api.types import User`
- `from aiogram.api.types.user import User`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#user)

View file

@ -0,0 +1,26 @@
# UserProfilePhotos
## Description
This object represent a user's profile pictures.
## Attributes
| Name | Type | Description |
| - | - | - |
| `total_count` | `#!python int` | Total number of profile pictures the target user has |
| `photos` | `#!python List[List[PhotoSize]]` | Requested profile pictures (in up to 4 sizes each) |
## Location
- `from aiogram.types import UserProfilePhotos`
- `from aiogram.api.types import UserProfilePhotos`
- `from aiogram.api.types.user_profile_photos import UserProfilePhotos`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#userprofilephotos)
- [aiogram.types.PhotoSize](../types/photo_size.md)

29
docs/api/types/venue.md Normal file
View file

@ -0,0 +1,29 @@
# Venue
## Description
This object represents a venue.
## Attributes
| Name | Type | Description |
| - | - | - |
| `location` | `#!python Location` | Venue location |
| `title` | `#!python str` | Name of the venue |
| `address` | `#!python str` | Address of the venue |
| `foursquare_id` | `#!python Optional[str]` | Optional. Foursquare identifier of the venue |
| `foursquare_type` | `#!python Optional[str]` | Optional. Foursquare type of the venue. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.) |
## Location
- `from aiogram.types import Venue`
- `from aiogram.api.types import Venue`
- `from aiogram.api.types.venue import Venue`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#venue)
- [aiogram.types.Location](../types/location.md)

31
docs/api/types/video.md Normal file
View file

@ -0,0 +1,31 @@
# Video
## Description
This object represents a video file.
## Attributes
| Name | Type | Description |
| - | - | - |
| `file_id` | `#!python str` | Identifier for this file |
| `width` | `#!python int` | Video width as defined by sender |
| `height` | `#!python int` | Video height as defined by sender |
| `duration` | `#!python int` | Duration of the video in seconds as defined by sender |
| `thumb` | `#!python Optional[PhotoSize]` | Optional. Video thumbnail |
| `mime_type` | `#!python Optional[str]` | Optional. Mime type of a file as defined by sender |
| `file_size` | `#!python Optional[int]` | Optional. File size |
## Location
- `from aiogram.types import Video`
- `from aiogram.api.types import Video`
- `from aiogram.api.types.video import Video`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#video)
- [aiogram.types.PhotoSize](../types/photo_size.md)

View file

@ -0,0 +1,29 @@
# VideoNote
## Description
This object represents a video message (available in Telegram apps as of v.4.0).
## Attributes
| Name | Type | Description |
| - | - | - |
| `file_id` | `#!python str` | Identifier for this file |
| `length` | `#!python int` | Video width and height (diameter of the video message) as defined by sender |
| `duration` | `#!python int` | Duration of the video in seconds as defined by sender |
| `thumb` | `#!python Optional[PhotoSize]` | Optional. Video thumbnail |
| `file_size` | `#!python Optional[int]` | Optional. File size |
## Location
- `from aiogram.types import VideoNote`
- `from aiogram.api.types import VideoNote`
- `from aiogram.api.types.video_note import VideoNote`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#videonote)
- [aiogram.types.PhotoSize](../types/photo_size.md)

27
docs/api/types/voice.md Normal file
View file

@ -0,0 +1,27 @@
# Voice
## Description
This object represents a voice note.
## Attributes
| Name | Type | Description |
| - | - | - |
| `file_id` | `#!python str` | Identifier for this file |
| `duration` | `#!python int` | Duration of the audio in seconds as defined by sender |
| `mime_type` | `#!python Optional[str]` | Optional. MIME type of the file as defined by sender |
| `file_size` | `#!python Optional[int]` | Optional. File size |
## Location
- `from aiogram.types import Voice`
- `from aiogram.api.types import Voice`
- `from aiogram.api.types.voice import Voice`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#voice)

View file

@ -0,0 +1,30 @@
# WebhookInfo
## Description
Contains information about the current status of a webhook.
## Attributes
| Name | Type | Description |
| - | - | - |
| `url` | `#!python str` | Webhook URL, may be empty if webhook is not set up |
| `has_custom_certificate` | `#!python bool` | True, if a custom certificate was provided for webhook certificate checks |
| `pending_update_count` | `#!python int` | Number of updates awaiting delivery |
| `last_error_date` | `#!python Optional[int]` | Optional. Unix time for the most recent error that happened when trying to deliver an update via webhook |
| `last_error_message` | `#!python Optional[str]` | Optional. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook |
| `max_connections` | `#!python Optional[int]` | Optional. Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery |
| `allowed_updates` | `#!python Optional[List[str]]` | Optional. A list of update types the bot is subscribed to. Defaults to all update types |
## Location
- `from aiogram.types import WebhookInfo`
- `from aiogram.api.types import WebhookInfo`
- `from aiogram.api.types.webhook_info import WebhookInfo`
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#webhookinfo)