mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-11 18:01:04 +00:00
Add support of Bot API 4.7. Bump version
This commit is contained in:
parent
4cb9697cb4
commit
33003f2026
167 changed files with 996 additions and 504 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## Description
|
||||
|
||||
Use this method to add a new sticker to a set created by the bot. Returns True on success.
|
||||
Use this method to add a new sticker to a set created by the bot. You must use exactly one of the fields png_sticker or tgs_sticker. Animated stickers can be added to animated sticker sets and only to them. Animated sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns True on success.
|
||||
|
||||
|
||||
## Arguments
|
||||
|
|
@ -11,8 +11,9 @@ Use this method to add a new sticker to a set created by the bot. Returns True o
|
|||
| - | - | - |
|
||||
| `user_id` | `#!python3 int` | User identifier of sticker set owner |
|
||||
| `name` | `#!python3 str` | Sticker set name |
|
||||
| `png_sticker` | `#!python3 Union[InputFile, str]` | Png image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. |
|
||||
| `png_sticker` | `#!python3 Union[InputFile, str]` | PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. |
|
||||
| `emojis` | `#!python3 str` | One or more emoji corresponding to the sticker |
|
||||
| `tgs_sticker` | `#!python3 Optional[InputFile]` | Optional. TGS animation with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/animated_stickers#technical-requirements for technical requirements |
|
||||
| `mask_position` | `#!python3 Optional[MaskPosition]` | Optional. A JSON-serialized object for position where the mask should be placed on faces |
|
||||
|
||||
|
||||
|
|
@ -26,8 +27,7 @@ Description: Returns True on success.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.add_sticker_to_set(...)
|
||||
|
|
@ -56,7 +56,6 @@ return AddStickerToSet(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#addstickertoset)
|
||||
|
|
|
|||
|
|
@ -28,8 +28,7 @@ Description: On success, True is returned.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.answer_callback_query(...)
|
||||
|
|
@ -58,7 +57,6 @@ return AnswerCallbackQuery(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#answercallbackquery)
|
||||
|
|
|
|||
|
|
@ -30,8 +30,7 @@ Description: On success, True is returned.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.answer_inline_query(...)
|
||||
|
|
@ -60,7 +59,6 @@ return AnswerInlineQuery(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#answerinlinequery)
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@ Description: On success, True is returned.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.answer_pre_checkout_query(...)
|
||||
|
|
@ -54,7 +53,6 @@ return AnswerPreCheckoutQuery(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#answerprecheckoutquery)
|
||||
|
|
|
|||
|
|
@ -25,8 +25,7 @@ Description: On success, True is returned.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.answer_shipping_query(...)
|
||||
|
|
@ -55,7 +54,6 @@ return AnswerShippingQuery(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#answershippingquery)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## Description
|
||||
|
||||
Use this method to create new sticker set owned by a user. The bot will be able to edit the created sticker set. Returns True on success.
|
||||
Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. You must use exactly one of the fields png_sticker or tgs_sticker. Returns True on success.
|
||||
|
||||
|
||||
## Arguments
|
||||
|
|
@ -12,8 +12,9 @@ Use this method to create new sticker set owned by a user. The bot will be able
|
|||
| `user_id` | `#!python3 int` | User identifier of created sticker set owner |
|
||||
| `name` | `#!python3 str` | Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in '_by_<bot username>'. <bot_username> is case insensitive. 1-64 characters. |
|
||||
| `title` | `#!python3 str` | Sticker set title, 1-64 characters |
|
||||
| `png_sticker` | `#!python3 Union[InputFile, str]` | Png image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. |
|
||||
| `emojis` | `#!python3 str` | One or more emoji corresponding to the sticker |
|
||||
| `png_sticker` | `#!python3 Optional[Union[InputFile, str]]` | Optional. PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. |
|
||||
| `tgs_sticker` | `#!python3 Optional[InputFile]` | Optional. TGS animation with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/animated_stickers#technical-requirements for technical requirements |
|
||||
| `contains_masks` | `#!python3 Optional[bool]` | Optional. Pass True, if a set of mask stickers should be created |
|
||||
| `mask_position` | `#!python3 Optional[MaskPosition]` | Optional. A JSON-serialized object for position where the mask should be placed on faces |
|
||||
|
||||
|
|
@ -28,8 +29,7 @@ Description: Returns True on success.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.create_new_sticker_set(...)
|
||||
|
|
@ -58,7 +58,6 @@ return CreateNewStickerSet(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#createnewstickerset)
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@ Description: Returns True on success.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.delete_chat_photo(...)
|
||||
|
|
@ -52,7 +51,6 @@ return DeleteChatPhoto(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#deletechatphoto)
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@ Description: Use the field can_set_sticker_set optionally returned in getChat re
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.delete_chat_sticker_set(...)
|
||||
|
|
@ -52,7 +51,6 @@ return DeleteChatStickerSet(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#deletechatstickerset)
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ Use this method to delete a message, including service messages, with the follow
|
|||
|
||||
- A message can only be deleted if it was sent less than 48 hours ago.
|
||||
|
||||
- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.
|
||||
|
||||
- Bots can delete outgoing messages in private chats, groups, and supergroups.
|
||||
|
||||
- Bots can delete incoming messages in private chats.
|
||||
|
|
@ -37,8 +39,7 @@ Description: Returns True on success.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.delete_message(...)
|
||||
|
|
@ -67,7 +68,6 @@ return DeleteMessage(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#deletemessage)
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@ Description: Returns True on success.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.delete_sticker_from_set(...)
|
||||
|
|
@ -52,7 +51,6 @@ return DeleteStickerFromSet(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#deletestickerfromset)
|
||||
|
|
|
|||
|
|
@ -16,8 +16,7 @@ Description: Returns True on success.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.delete_webhook(...)
|
||||
|
|
@ -46,7 +45,6 @@ return DeleteWebhook(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#deletewebhook)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Use this method to edit captions of messages. On success, if edited message is s
|
|||
| `chat_id` | `#!python3 Optional[Union[int, str]]` | Optional. Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername) |
|
||||
| `message_id` | `#!python3 Optional[int]` | Optional. Required if inline_message_id is not specified. Identifier of the message to edit |
|
||||
| `inline_message_id` | `#!python3 Optional[str]` | Optional. Required if chat_id and message_id are not specified. Identifier of the inline message |
|
||||
| `caption` | `#!python3 Optional[str]` | Optional. New caption of the message |
|
||||
| `caption` | `#!python3 Optional[str]` | Optional. New caption of the message, 0-1024 characters after entities parsing |
|
||||
| `parse_mode` | `#!python3 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` | `#!python3 Optional[InlineKeyboardMarkup]` | Optional. A JSON-serialized object for an inline keyboard. |
|
||||
|
||||
|
|
@ -27,8 +27,7 @@ Description: On success, if edited message is sent by the bot, the edited Messag
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: Union[Message, bool] = await bot.edit_message_caption(...)
|
||||
|
|
@ -57,7 +56,6 @@ return EditMessageCaption(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#editmessagecaption)
|
||||
|
|
|
|||
|
|
@ -27,8 +27,7 @@ Description: On success, if the edited message was sent by the bot, the edited M
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: Union[Message, bool] = await bot.edit_message_live_location(...)
|
||||
|
|
@ -57,7 +56,6 @@ return EditMessageLiveLocation(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#editmessagelivelocation)
|
||||
|
|
|
|||
|
|
@ -26,8 +26,7 @@ Description: On success, if the edited message was sent by the bot, the edited M
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: Union[Message, bool] = await bot.edit_message_media(...)
|
||||
|
|
@ -56,7 +55,6 @@ return EditMessageMedia(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#editmessagemedia)
|
||||
|
|
|
|||
|
|
@ -25,8 +25,7 @@ Description: On success, if edited message is sent by the bot, the edited Messag
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: Union[Message, bool] = await bot.edit_message_reply_markup(...)
|
||||
|
|
@ -55,7 +54,6 @@ return EditMessageReplyMarkup(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#editmessagereplymarkup)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ Use this method to edit text and game messages. On success, if edited message is
|
|||
|
||||
| Name | Type | Description |
|
||||
| - | - | - |
|
||||
| `text` | `#!python3 str` | New text of the message |
|
||||
| `text` | `#!python3 str` | New text of the message, 1-4096 characters after entities parsing |
|
||||
| `chat_id` | `#!python3 Optional[Union[int, str]]` | Optional. Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername) |
|
||||
| `message_id` | `#!python3 Optional[int]` | Optional. Required if inline_message_id is not specified. Identifier of the message to edit |
|
||||
| `inline_message_id` | `#!python3 Optional[str]` | Optional. Required if chat_id and message_id are not specified. Identifier of the inline message |
|
||||
|
|
@ -28,8 +28,7 @@ Description: On success, if edited message is sent by the bot, the edited Messag
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: Union[Message, bool] = await bot.edit_message_text(...)
|
||||
|
|
@ -58,7 +57,6 @@ return EditMessageText(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#editmessagetext)
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@ Description: Returns the new invite link as String on success.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: str = await bot.export_chat_invite_link(...)
|
||||
|
|
@ -54,7 +53,6 @@ return ExportChatInviteLink(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#exportchatinvitelink)
|
||||
|
|
|
|||
|
|
@ -25,8 +25,7 @@ Description: On success, the sent Message is returned.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: Message = await bot.forward_message(...)
|
||||
|
|
@ -55,7 +54,6 @@ return ForwardMessage(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#forwardmessage)
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@ Description: Returns a Chat object on success.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: Chat = await bot.get_chat(...)
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@ Description: On success, returns an Array of ChatMember objects that contains in
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: List[ChatMember] = await bot.get_chat_administrators(...)
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@ Description: Returns a ChatMember object on success.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: ChatMember = await bot.get_chat_member(...)
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@ Description: Returns Int on success.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: int = await bot.get_chat_members_count(...)
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@ Description: On success, a File object is returned.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: File = await bot.get_file(...)
|
||||
|
|
|
|||
|
|
@ -27,8 +27,7 @@ Description: Will return the score of the specified user and several of his neig
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: List[GameHighScore] = await bot.get_game_high_scores(...)
|
||||
|
|
|
|||
|
|
@ -16,8 +16,7 @@ Description: Returns basic information about the bot in form of a User object.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: User = await bot.get_me(...)
|
||||
|
|
|
|||
48
docs/api/methods/get_my_commands.md
Normal file
48
docs/api/methods/get_my_commands.md
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
# getMyCommands
|
||||
|
||||
## Description
|
||||
|
||||
Use this method to get the current list of the bot's commands. Requires no parameters. Returns Array of BotCommand on success.
|
||||
|
||||
|
||||
|
||||
|
||||
## Response
|
||||
|
||||
Type: `#!python3 List[BotCommand]`
|
||||
|
||||
Description: Returns Array of BotCommand on success.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: List[BotCommand] = await bot.get_my_commands(...)
|
||||
```
|
||||
|
||||
### Method as object
|
||||
|
||||
Imports:
|
||||
|
||||
- `from aiogram.methods import GetMyCommands`
|
||||
- `from aiogram.api.methods import GetMyCommands`
|
||||
- `from aiogram.api.methods.get_my_commands import GetMyCommands`
|
||||
|
||||
#### In handlers with current bot
|
||||
```python3
|
||||
result: List[BotCommand] = await GetMyCommands(...)
|
||||
```
|
||||
|
||||
#### With specific bot
|
||||
```python3
|
||||
result: List[BotCommand] = await bot(GetMyCommands(...))
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#getmycommands)
|
||||
- [aiogram.types.BotCommand](../types/bot_command.md)
|
||||
|
|
@ -22,8 +22,7 @@ Description: On success, a StickerSet object is returned.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: StickerSet = await bot.get_sticker_set(...)
|
||||
|
|
|
|||
|
|
@ -31,8 +31,7 @@ Description: An Array of Update objects is returned.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: List[Update] = await bot.get_updates(...)
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@ Description: Returns a UserProfilePhotos object.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: UserProfilePhotos = await bot.get_user_profile_photos(...)
|
||||
|
|
|
|||
|
|
@ -16,8 +16,7 @@ Description: On success, returns a WebhookInfo object. If the bot is using getUp
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: WebhookInfo = await bot.get_webhook_info(...)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
Here is list of all available API methods:
|
||||
|
||||
|
||||
- Getting updates
|
||||
- [getUpdates](get_updates.md)
|
||||
- [setWebhook](set_webhook.md)
|
||||
|
|
@ -26,6 +25,7 @@ Here is list of all available API methods:
|
|||
- [sendVenue](send_venue.md)
|
||||
- [sendContact](send_contact.md)
|
||||
- [sendPoll](send_poll.md)
|
||||
- [sendDice](send_dice.md)
|
||||
- [sendChatAction](send_chat_action.md)
|
||||
- [getUserProfilePhotos](get_user_profile_photos.md)
|
||||
- [getFile](get_file.md)
|
||||
|
|
@ -50,6 +50,8 @@ Here is list of all available API methods:
|
|||
- [setChatStickerSet](set_chat_sticker_set.md)
|
||||
- [deleteChatStickerSet](delete_chat_sticker_set.md)
|
||||
- [answerCallbackQuery](answer_callback_query.md)
|
||||
- [setMyCommands](set_my_commands.md)
|
||||
- [getMyCommands](get_my_commands.md)
|
||||
- Updating messages
|
||||
- [editMessageText](edit_message_text.md)
|
||||
- [editMessageCaption](edit_message_caption.md)
|
||||
|
|
@ -65,6 +67,7 @@ Here is list of all available API methods:
|
|||
- [addStickerToSet](add_sticker_to_set.md)
|
||||
- [setStickerPositionInSet](set_sticker_position_in_set.md)
|
||||
- [deleteStickerFromSet](delete_sticker_from_set.md)
|
||||
- [setStickerSetThumb](set_sticker_set_thumb.md)
|
||||
- Inline mode
|
||||
- [answerInlineQuery](answer_inline_query.md)
|
||||
- Payments
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@ Description: In the case of supergroups and channels, the user will not be able
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.kick_chat_member(...)
|
||||
|
|
@ -54,7 +53,6 @@ return KickChatMember(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#kickchatmember)
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@ Description: Returns True on success.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.leave_chat(...)
|
||||
|
|
@ -52,7 +51,6 @@ return LeaveChat(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#leavechat)
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@ Description: Returns True on success.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.pin_chat_message(...)
|
||||
|
|
@ -54,7 +53,6 @@ return PinChatMessage(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#pinchatmessage)
|
||||
|
|
|
|||
|
|
@ -31,8 +31,7 @@ Description: Returns True on success.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.promote_chat_member(...)
|
||||
|
|
@ -61,7 +60,6 @@ return PromoteChatMember(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#promotechatmember)
|
||||
|
|
|
|||
|
|
@ -25,8 +25,7 @@ Description: Returns True on success.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.restrict_chat_member(...)
|
||||
|
|
@ -55,7 +54,6 @@ return RestrictChatMember(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#restrictchatmember)
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without s
|
|||
| `width` | `#!python3 Optional[int]` | Optional. Animation width |
|
||||
| `height` | `#!python3 Optional[int]` | Optional. Animation height |
|
||||
| `thumb` | `#!python3 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 thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t 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` | `#!python3 Optional[str]` | Optional. Animation caption (may also be used when resending animation by file_id), 0-1024 characters |
|
||||
| `caption` | `#!python3 Optional[str]` | Optional. Animation caption (may also be used when resending animation by file_id), 0-1024 characters after entities parsing |
|
||||
| `parse_mode` | `#!python3 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. |
|
||||
| `disable_notification` | `#!python3 Optional[bool]` | Optional. Sends the message silently. Users will receive a notification with no sound. |
|
||||
| `reply_to_message_id` | `#!python3 Optional[int]` | Optional. If the message is a reply, ID of the original message |
|
||||
|
|
@ -32,8 +32,7 @@ Description: On success, the sent Message is returned.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: Message = await bot.send_animation(...)
|
||||
|
|
@ -62,7 +61,6 @@ return SendAnimation(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#sendanimation)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ For sending voice messages, use the sendVoice method instead.
|
|||
| - | - | - |
|
||||
| `chat_id` | `#!python3 Union[int, str]` | Unique identifier for the target chat or username of the target channel (in the format @channelusername) |
|
||||
| `audio` | `#!python3 Union[InputFile, str]` | Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. |
|
||||
| `caption` | `#!python3 Optional[str]` | Optional. Audio caption, 0-1024 characters |
|
||||
| `caption` | `#!python3 Optional[str]` | Optional. Audio caption, 0-1024 characters after entities parsing |
|
||||
| `parse_mode` | `#!python3 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` | `#!python3 Optional[int]` | Optional. Duration of the audio in seconds |
|
||||
| `performer` | `#!python3 Optional[str]` | Optional. Performer |
|
||||
|
|
@ -34,8 +34,7 @@ Description: On success, the sent Message is returned.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: Message = await bot.send_audio(...)
|
||||
|
|
@ -64,7 +63,6 @@ return SendAudio(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#sendaudio)
|
||||
|
|
|
|||
|
|
@ -27,8 +27,7 @@ Description: Returns True on success.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.send_chat_action(...)
|
||||
|
|
@ -57,7 +56,6 @@ return SendChatAction(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#sendchataction)
|
||||
|
|
|
|||
|
|
@ -29,8 +29,7 @@ Description: On success, the sent Message is returned.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: Message = await bot.send_contact(...)
|
||||
|
|
@ -59,7 +58,6 @@ return SendContact(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#sendcontact)
|
||||
|
|
|
|||
64
docs/api/methods/send_dice.md
Normal file
64
docs/api/methods/send_dice.md
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
# sendDice
|
||||
|
||||
## Description
|
||||
|
||||
Use this method to send a dice, which will have a random value from 1 to 6. On success, the sent Message is returned. (Yes, we're aware of the 'proper' singular of die. But it's awkward, and we decided to help it change. One dice at a time!)
|
||||
|
||||
|
||||
## Arguments
|
||||
|
||||
| Name | Type | Description |
|
||||
| - | - | - |
|
||||
| `chat_id` | `#!python3 Union[int, str]` | Unique identifier for the target chat or username of the target channel (in the format @channelusername) |
|
||||
| `disable_notification` | `#!python3 Optional[bool]` | Optional. Sends the message silently. Users will receive a notification with no sound. |
|
||||
| `reply_to_message_id` | `#!python3 Optional[int]` | Optional. If the message is a reply, ID of the original message |
|
||||
| `reply_markup` | `#!python3 Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]]` | Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. |
|
||||
|
||||
|
||||
|
||||
## Response
|
||||
|
||||
Type: `#!python3 Message`
|
||||
|
||||
Description: On success, the sent Message is returned.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: Message = await bot.send_dice(...)
|
||||
```
|
||||
|
||||
### Method as object
|
||||
|
||||
Imports:
|
||||
|
||||
- `from aiogram.methods import SendDice`
|
||||
- `from aiogram.api.methods import SendDice`
|
||||
- `from aiogram.api.methods.send_dice import SendDice`
|
||||
|
||||
#### In handlers with current bot
|
||||
```python3
|
||||
result: Message = await SendDice(...)
|
||||
```
|
||||
|
||||
#### With specific bot
|
||||
```python3
|
||||
result: Message = await bot(SendDice(...))
|
||||
```
|
||||
#### As reply into Webhook in handler
|
||||
```python3
|
||||
return SendDice(...)
|
||||
```
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#senddice)
|
||||
- [aiogram.types.ForceReply](../types/force_reply.md)
|
||||
- [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md)
|
||||
- [aiogram.types.Message](../types/message.md)
|
||||
- [aiogram.types.ReplyKeyboardMarkup](../types/reply_keyboard_markup.md)
|
||||
- [aiogram.types.ReplyKeyboardRemove](../types/reply_keyboard_remove.md)
|
||||
|
|
@ -12,7 +12,7 @@ Use this method to send general files. On success, the sent Message is returned.
|
|||
| `chat_id` | `#!python3 Union[int, str]` | Unique identifier for the target chat or username of the target channel (in the format @channelusername) |
|
||||
| `document` | `#!python3 Union[InputFile, str]` | File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. |
|
||||
| `thumb` | `#!python3 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 thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t 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` | `#!python3 Optional[str]` | Optional. Document caption (may also be used when resending documents by file_id), 0-1024 characters |
|
||||
| `caption` | `#!python3 Optional[str]` | Optional. Document caption (may also be used when resending documents by file_id), 0-1024 characters after entities parsing |
|
||||
| `parse_mode` | `#!python3 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. |
|
||||
| `disable_notification` | `#!python3 Optional[bool]` | Optional. Sends the message silently. Users will receive a notification with no sound. |
|
||||
| `reply_to_message_id` | `#!python3 Optional[int]` | Optional. If the message is a reply, ID of the original message |
|
||||
|
|
@ -29,8 +29,7 @@ Description: On success, the sent Message is returned.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: Message = await bot.send_document(...)
|
||||
|
|
@ -59,7 +58,6 @@ return SendDocument(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#senddocument)
|
||||
|
|
|
|||
|
|
@ -26,8 +26,7 @@ Description: On success, the sent Message is returned.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: Message = await bot.send_game(...)
|
||||
|
|
@ -56,7 +55,6 @@ return SendGame(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#sendgame)
|
||||
|
|
|
|||
|
|
@ -44,8 +44,7 @@ Description: On success, the sent Message is returned.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: Message = await bot.send_invoice(...)
|
||||
|
|
@ -74,7 +73,6 @@ return SendInvoice(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#sendinvoice)
|
||||
|
|
|
|||
|
|
@ -28,8 +28,7 @@ Description: On success, the sent Message is returned.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: Message = await bot.send_location(...)
|
||||
|
|
@ -58,7 +57,6 @@ return SendLocation(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#sendlocation)
|
||||
|
|
|
|||
|
|
@ -25,8 +25,7 @@ Description: On success, an array of the sent Messages is returned.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: List[Message] = await bot.send_media_group(...)
|
||||
|
|
@ -55,7 +54,6 @@ return SendMediaGroup(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#sendmediagroup)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Use this method to send text messages. On success, the sent Message is returned.
|
|||
| Name | Type | Description |
|
||||
| - | - | - |
|
||||
| `chat_id` | `#!python3 Union[int, str]` | Unique identifier for the target chat or username of the target channel (in the format @channelusername) |
|
||||
| `text` | `#!python3 str` | Text of the message to be sent |
|
||||
| `text` | `#!python3 str` | Text of the message to be sent, 1-4096 characters after entities parsing |
|
||||
| `parse_mode` | `#!python3 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` | `#!python3 Optional[bool]` | Optional. Disables link previews for links in this message |
|
||||
| `disable_notification` | `#!python3 Optional[bool]` | Optional. Sends the message silently. Users will receive a notification with no sound. |
|
||||
|
|
@ -28,8 +28,7 @@ Description: On success, the sent Message is returned.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: Message = await bot.send_message(...)
|
||||
|
|
@ -58,7 +57,6 @@ return SendMessage(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#sendmessage)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Use this method to send photos. On success, the sent Message is returned.
|
|||
| - | - | - |
|
||||
| `chat_id` | `#!python3 Union[int, str]` | Unique identifier for the target chat or username of the target channel (in the format @channelusername) |
|
||||
| `photo` | `#!python3 Union[InputFile, str]` | Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. |
|
||||
| `caption` | `#!python3 Optional[str]` | Optional. Photo caption (may also be used when resending photos by file_id), 0-1024 characters |
|
||||
| `caption` | `#!python3 Optional[str]` | Optional. Photo caption (may also be used when resending photos by file_id), 0-1024 characters after entities parsing |
|
||||
| `parse_mode` | `#!python3 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. |
|
||||
| `disable_notification` | `#!python3 Optional[bool]` | Optional. Sends the message silently. Users will receive a notification with no sound. |
|
||||
| `reply_to_message_id` | `#!python3 Optional[int]` | Optional. If the message is a reply, ID of the original message |
|
||||
|
|
@ -28,8 +28,7 @@ Description: On success, the sent Message is returned.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: Message = await bot.send_photo(...)
|
||||
|
|
@ -58,7 +57,6 @@ return SendPhoto(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#sendphoto)
|
||||
|
|
|
|||
|
|
@ -32,8 +32,7 @@ Description: On success, the sent Message is returned.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: Message = await bot.send_poll(...)
|
||||
|
|
@ -62,7 +61,6 @@ return SendPoll(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#sendpoll)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Use this method to send static .WEBP or animated .TGS stickers. On success, the
|
|||
| Name | Type | Description |
|
||||
| - | - | - |
|
||||
| `chat_id` | `#!python3 Union[int, str]` | Unique identifier for the target chat or username of the target channel (in the format @channelusername) |
|
||||
| `sticker` | `#!python3 Union[InputFile, str]` | Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .webp file from the Internet, or upload a new one using multipart/form-data. |
|
||||
| `sticker` | `#!python3 Union[InputFile, str]` | Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP file from the Internet, or upload a new one using multipart/form-data. |
|
||||
| `disable_notification` | `#!python3 Optional[bool]` | Optional. Sends the message silently. Users will receive a notification with no sound. |
|
||||
| `reply_to_message_id` | `#!python3 Optional[int]` | Optional. If the message is a reply, ID of the original message |
|
||||
| `reply_markup` | `#!python3 Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]]` | Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. |
|
||||
|
|
@ -26,8 +26,7 @@ Description: On success, the sent Message is returned.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: Message = await bot.send_sticker(...)
|
||||
|
|
@ -56,7 +55,6 @@ return SendSticker(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#sendsticker)
|
||||
|
|
|
|||
|
|
@ -31,8 +31,7 @@ Description: On success, the sent Message is returned.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: Message = await bot.send_venue(...)
|
||||
|
|
@ -61,7 +60,6 @@ return SendVenue(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#sendvenue)
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ Use this method to send video files, Telegram clients support mp4 videos (other
|
|||
| `width` | `#!python3 Optional[int]` | Optional. Video width |
|
||||
| `height` | `#!python3 Optional[int]` | Optional. Video height |
|
||||
| `thumb` | `#!python3 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 thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t 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` | `#!python3 Optional[str]` | Optional. Video caption (may also be used when resending videos by file_id), 0-1024 characters |
|
||||
| `caption` | `#!python3 Optional[str]` | Optional. Video caption (may also be used when resending videos by file_id), 0-1024 characters after entities parsing |
|
||||
| `parse_mode` | `#!python3 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. |
|
||||
| `supports_streaming` | `#!python3 Optional[bool]` | Optional. Pass True, if the uploaded video is suitable for streaming |
|
||||
| `disable_notification` | `#!python3 Optional[bool]` | Optional. Sends the message silently. Users will receive a notification with no sound. |
|
||||
|
|
@ -33,8 +33,7 @@ Description: On success, the sent Message is returned.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: Message = await bot.send_video(...)
|
||||
|
|
@ -63,7 +62,6 @@ return SendVideo(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#sendvideo)
|
||||
|
|
|
|||
|
|
@ -29,8 +29,7 @@ Description: On success, the sent Message is returned.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: Message = await bot.send_video_note(...)
|
||||
|
|
@ -59,7 +58,6 @@ return SendVideoNote(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#sendvideonote)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## Description
|
||||
|
||||
Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .ogg file encoded with OPUS (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
|
||||
Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
|
||||
|
||||
|
||||
## Arguments
|
||||
|
|
@ -11,7 +11,7 @@ Use this method to send audio files, if you want Telegram clients to display the
|
|||
| - | - | - |
|
||||
| `chat_id` | `#!python3 Union[int, str]` | Unique identifier for the target chat or username of the target channel (in the format @channelusername) |
|
||||
| `voice` | `#!python3 Union[InputFile, str]` | Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. |
|
||||
| `caption` | `#!python3 Optional[str]` | Optional. Voice message caption, 0-1024 characters |
|
||||
| `caption` | `#!python3 Optional[str]` | Optional. Voice message caption, 0-1024 characters after entities parsing |
|
||||
| `parse_mode` | `#!python3 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` | `#!python3 Optional[int]` | Optional. Duration of the voice message in seconds |
|
||||
| `disable_notification` | `#!python3 Optional[bool]` | Optional. Sends the message silently. Users will receive a notification with no sound. |
|
||||
|
|
@ -29,8 +29,7 @@ Description: On success, the sent Message is returned.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: Message = await bot.send_voice(...)
|
||||
|
|
@ -59,7 +58,6 @@ return SendVoice(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#sendvoice)
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@ Description: Returns True on success.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.set_chat_administrator_custom_title(...)
|
||||
|
|
@ -54,7 +53,6 @@ return SetChatAdministratorCustomTitle(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#setchatadministratorcustomtitle)
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@ Description: Returns True on success.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.set_chat_description(...)
|
||||
|
|
@ -53,7 +52,6 @@ return SetChatDescription(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#setchatdescription)
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@ Description: Returns True on success.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.set_chat_permissions(...)
|
||||
|
|
@ -53,7 +52,6 @@ return SetChatPermissions(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#setchatpermissions)
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@ Description: Returns True on success.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.set_chat_photo(...)
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@ Description: Use the field can_set_sticker_set optionally returned in getChat re
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.set_chat_sticker_set(...)
|
||||
|
|
@ -53,7 +52,6 @@ return SetChatStickerSet(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#setchatstickerset)
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@ Description: Returns True on success.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.set_chat_title(...)
|
||||
|
|
@ -53,7 +52,6 @@ return SetChatTitle(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#setchattitle)
|
||||
|
|
|
|||
|
|
@ -28,8 +28,7 @@ Description: On success, if the message was sent by the bot, returns the edited
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: Union[Message, bool] = await bot.set_game_score(...)
|
||||
|
|
@ -58,7 +57,6 @@ return SetGameScore(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#setgamescore)
|
||||
|
|
|
|||
57
docs/api/methods/set_my_commands.md
Normal file
57
docs/api/methods/set_my_commands.md
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
# setMyCommands
|
||||
|
||||
## Description
|
||||
|
||||
Use this method to change the list of the bot's commands. Returns True on success.
|
||||
|
||||
|
||||
## Arguments
|
||||
|
||||
| Name | Type | Description |
|
||||
| - | - | - |
|
||||
| `commands` | `#!python3 List[BotCommand]` | A JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified. |
|
||||
|
||||
|
||||
|
||||
## Response
|
||||
|
||||
Type: `#!python3 bool`
|
||||
|
||||
Description: Returns True on success.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.set_my_commands(...)
|
||||
```
|
||||
|
||||
### Method as object
|
||||
|
||||
Imports:
|
||||
|
||||
- `from aiogram.methods import SetMyCommands`
|
||||
- `from aiogram.api.methods import SetMyCommands`
|
||||
- `from aiogram.api.methods.set_my_commands import SetMyCommands`
|
||||
|
||||
#### In handlers with current bot
|
||||
```python3
|
||||
result: bool = await SetMyCommands(...)
|
||||
```
|
||||
|
||||
#### With specific bot
|
||||
```python3
|
||||
result: bool = await bot(SetMyCommands(...))
|
||||
```
|
||||
#### As reply into Webhook in handler
|
||||
```python3
|
||||
return SetMyCommands(...)
|
||||
```
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#setmycommands)
|
||||
- [aiogram.types.BotCommand](../types/bot_command.md)
|
||||
|
|
@ -25,8 +25,7 @@ Description: The user will not be able to re-submit their Passport to you until
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.set_passport_data_errors(...)
|
||||
|
|
@ -55,7 +54,6 @@ return SetPassportDataErrors(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#setpassportdataerrors)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## Description
|
||||
|
||||
Use this method to move a sticker in a set created by the bot to a specific position . Returns True on success.
|
||||
Use this method to move a sticker in a set created by the bot to a specific position. Returns True on success.
|
||||
|
||||
|
||||
## Arguments
|
||||
|
|
@ -23,8 +23,7 @@ Description: Returns True on success.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.set_sticker_position_in_set(...)
|
||||
|
|
@ -53,7 +52,6 @@ return SetStickerPositionInSet(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#setstickerpositioninset)
|
||||
|
|
|
|||
60
docs/api/methods/set_sticker_set_thumb.md
Normal file
60
docs/api/methods/set_sticker_set_thumb.md
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
# setStickerSetThumb
|
||||
|
||||
## Description
|
||||
|
||||
Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Returns True on success.
|
||||
|
||||
|
||||
## Arguments
|
||||
|
||||
| Name | Type | Description |
|
||||
| - | - | - |
|
||||
| `name` | `#!python3 str` | Sticker set name |
|
||||
| `user_id` | `#!python3 int` | User identifier of the sticker set owner |
|
||||
| `thumb` | `#!python3 Optional[Union[InputFile, str]]` | Optional. A PNG image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a TGS animation with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/animated_stickers#technical-requirements for animated sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data.. Animated sticker set thumbnail can't be uploaded via HTTP URL. |
|
||||
|
||||
|
||||
|
||||
## Response
|
||||
|
||||
Type: `#!python3 bool`
|
||||
|
||||
Description: Returns True on success.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.set_sticker_set_thumb(...)
|
||||
```
|
||||
|
||||
### Method as object
|
||||
|
||||
Imports:
|
||||
|
||||
- `from aiogram.methods import SetStickerSetThumb`
|
||||
- `from aiogram.api.methods import SetStickerSetThumb`
|
||||
- `from aiogram.api.methods.set_sticker_set_thumb import SetStickerSetThumb`
|
||||
|
||||
#### In handlers with current bot
|
||||
```python3
|
||||
result: bool = await SetStickerSetThumb(...)
|
||||
```
|
||||
|
||||
#### With specific bot
|
||||
```python3
|
||||
result: bool = await bot(SetStickerSetThumb(...))
|
||||
```
|
||||
#### As reply into Webhook in handler
|
||||
```python3
|
||||
return SetStickerSetThumb(...)
|
||||
```
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#setstickersetthumb)
|
||||
- [aiogram.types.InputFile](../types/input_file.md)
|
||||
- [How to upload file?](../sending_files.md)
|
||||
|
|
@ -37,8 +37,7 @@ Description: Returns True on success.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.set_webhook(...)
|
||||
|
|
@ -67,7 +66,6 @@ return SetWebhook(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#setwebhook)
|
||||
|
|
|
|||
|
|
@ -25,8 +25,7 @@ Description: On success, if the message was sent by the bot, the sent Message is
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: Union[Message, bool] = await bot.stop_message_live_location(...)
|
||||
|
|
@ -55,7 +54,6 @@ return StopMessageLiveLocation(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#stopmessagelivelocation)
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@ Description: On success, the stopped Poll with the final results is returned.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: Poll = await bot.stop_poll(...)
|
||||
|
|
@ -54,7 +53,6 @@ return StopPoll(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#stoppoll)
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@ Description: The user will not return to the group or channel automatically, but
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.unban_chat_member(...)
|
||||
|
|
@ -53,7 +52,6 @@ return UnbanChatMember(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#unbanchatmember)
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@ Description: Returns True on success.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: bool = await bot.unpin_chat_message(...)
|
||||
|
|
@ -52,7 +51,6 @@ return UnpinChatMessage(...)
|
|||
```
|
||||
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#unpinchatmessage)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## Description
|
||||
|
||||
Use this method to upload a .png file with a sticker for later use in createNewStickerSet and addStickerToSet methods (can be used multiple times). Returns the uploaded File on success.
|
||||
Use this method to upload a .PNG file with a sticker for later use in createNewStickerSet and addStickerToSet methods (can be used multiple times). Returns the uploaded File on success.
|
||||
|
||||
|
||||
## Arguments
|
||||
|
|
@ -23,8 +23,7 @@ Description: Returns the uploaded File on success.
|
|||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
### As bot method
|
||||
|
||||
```python3
|
||||
result: File = await bot.upload_sticker_file(...)
|
||||
|
|
|
|||
25
docs/api/types/bot_command.md
Normal file
25
docs/api/types/bot_command.md
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# BotCommand
|
||||
|
||||
## Description
|
||||
|
||||
This object represents a bot command.
|
||||
|
||||
|
||||
## Attributes
|
||||
|
||||
| Name | Type | Description |
|
||||
| - | - | - |
|
||||
| `command` | `#!python str` | Text of the command, 1-32 characters. Can contain only lowercase English letters, digits and underscores. |
|
||||
| `description` | `#!python str` | Description of the command, 3-256 characters. |
|
||||
|
||||
|
||||
|
||||
## Location
|
||||
|
||||
- `from aiogram.types import BotCommand`
|
||||
- `from aiogram.api.types import BotCommand`
|
||||
- `from aiogram.api.types.bot_command import BotCommand`
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#botcommand)
|
||||
24
docs/api/types/dice.md
Normal file
24
docs/api/types/dice.md
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# Dice
|
||||
|
||||
## Description
|
||||
|
||||
This object represents a dice with random value from 1 to 6. (Yes, we're aware of the 'proper' singular of die. But it's awkward, and we decided to help it change. One dice at a time!)
|
||||
|
||||
|
||||
## Attributes
|
||||
|
||||
| Name | Type | Description |
|
||||
| - | - | - |
|
||||
| `value` | `#!python int` | Value of the dice, 1-6 |
|
||||
|
||||
|
||||
|
||||
## Location
|
||||
|
||||
- `from aiogram.types import Dice`
|
||||
- `from aiogram.api.types import Dice`
|
||||
- `from aiogram.api.types.dice import Dice`
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#dice)
|
||||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
Here is list of all available API types:
|
||||
|
||||
|
||||
- Getting updates
|
||||
- [Update](update.md)
|
||||
- [WebhookInfo](webhook_info.md)
|
||||
|
|
@ -24,6 +23,7 @@ Here is list of all available API types:
|
|||
- [PollOption](poll_option.md)
|
||||
- [PollAnswer](poll_answer.md)
|
||||
- [Poll](poll.md)
|
||||
- [Dice](dice.md)
|
||||
- [UserProfilePhotos](user_profile_photos.md)
|
||||
- [File](file.md)
|
||||
- [ReplyKeyboardMarkup](reply_keyboard_markup.md)
|
||||
|
|
@ -38,6 +38,7 @@ Here is list of all available API types:
|
|||
- [ChatPhoto](chat_photo.md)
|
||||
- [ChatMember](chat_member.md)
|
||||
- [ChatPermissions](chat_permissions.md)
|
||||
- [BotCommand](bot_command.md)
|
||||
- [ResponseParameters](response_parameters.md)
|
||||
- [InputMedia](input_media.md)
|
||||
- [InputMediaPhoto](input_media_photo.md)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ This object represents an incoming inline query. When the user sends an empty qu
|
|||
| - | - | - |
|
||||
| `id` | `#!python str` | Unique identifier for this query |
|
||||
| `from_user` | `#!python User` | Sender |
|
||||
| `query` | `#!python str` | Text of the query (up to 512 characters) |
|
||||
| `query` | `#!python str` | Text of the query (up to 256 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 |
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ Note: This will only work in Telegram versions released after 9 April, 2016. Old
|
|||
| `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 |
|
||||
| `caption` | `#!python Optional[str]` | Optional. Caption, 0-1024 characters after entities parsing |
|
||||
| `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 |
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ Note: This will only work in Telegram versions released after 9 April, 2016. Old
|
|||
| `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 |
|
||||
| `caption` | `#!python Optional[str]` | Optional. Caption, 0-1024 characters after entities parsing |
|
||||
| `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 |
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ Note: This will only work in Telegram versions released after 9 April, 2016. Old
|
|||
| `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 |
|
||||
| `caption` | `#!python Optional[str]` | Optional. Caption of the document to be sent, 0-1024 characters after entities parsing |
|
||||
| `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 |
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ Represents a link to an animated GIF file stored on the Telegram servers. By def
|
|||
| `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 |
|
||||
| `caption` | `#!python Optional[str]` | Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing |
|
||||
| `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 |
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) st
|
|||
| `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 |
|
||||
| `caption` | `#!python Optional[str]` | Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing |
|
||||
| `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 |
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ Represents a link to a photo stored on the Telegram servers. By default, this ph
|
|||
| `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 |
|
||||
| `caption` | `#!python Optional[str]` | Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing |
|
||||
| `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 |
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ Represents a link to a video file stored on the Telegram servers. By default, th
|
|||
| `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 |
|
||||
| `caption` | `#!python Optional[str]` | Optional. Caption of the video to be sent, 0-1024 characters after entities parsing |
|
||||
| `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 |
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ Note: This will only work in Telegram versions released after 9 April, 2016. Old
|
|||
| `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 |
|
||||
| `caption` | `#!python Optional[str]` | Optional. Caption, 0-1024 characters after entities parsing |
|
||||
| `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 |
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ Note: This will only work in Telegram versions released after 9 April, 2016. Old
|
|||
| `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 |
|
||||
| `caption` | `#!python Optional[str]` | Optional. Caption of the document to be sent, 0-1024 characters after entities parsing |
|
||||
| `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 |
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ Represents a link to an animated GIF file. By default, this animated GIF file wi
|
|||
| `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 |
|
||||
| `caption` | `#!python Optional[str]` | Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing |
|
||||
| `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 |
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). B
|
|||
| `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 |
|
||||
| `caption` | `#!python Optional[str]` | Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing |
|
||||
| `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 |
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ Represents a link to a photo. By default, this photo will be sent by the user wi
|
|||
| `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 |
|
||||
| `caption` | `#!python Optional[str]` | Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing |
|
||||
| `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 |
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube),
|
|||
| `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 |
|
||||
| `caption` | `#!python Optional[str]` | Optional. Caption of the video to be sent, 0-1024 characters after entities parsing |
|
||||
| `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 |
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## 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.
|
||||
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.
|
||||
|
||||
|
|
@ -15,7 +15,7 @@ Note: This will only work in Telegram versions released after 9 April, 2016. Old
|
|||
| `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 |
|
||||
| `caption` | `#!python Optional[str]` | Optional. Caption, 0-1024 characters after entities parsing |
|
||||
| `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 |
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be
|
|||
| `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 thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t 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 |
|
||||
| `caption` | `#!python Optional[str]` | Optional. Caption of the animation to be sent, 0-1024 characters after entities parsing |
|
||||
| `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 |
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Represents an audio file to be treated as music to be sent.
|
|||
| `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 thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t 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 |
|
||||
| `caption` | `#!python Optional[str]` | Optional. Caption of the audio to be sent, 0-1024 characters after entities parsing |
|
||||
| `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 |
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Represents a general file to be sent.
|
|||
| `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 thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t 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 |
|
||||
| `caption` | `#!python Optional[str]` | Optional. Caption of the document to be sent, 0-1024 characters after entities parsing |
|
||||
| `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. |
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Represents a photo to be sent.
|
|||
| - | - | - |
|
||||
| `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 |
|
||||
| `caption` | `#!python Optional[str]` | Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing |
|
||||
| `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. |
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Represents a video to be sent.
|
|||
| `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 thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t 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 |
|
||||
| `caption` | `#!python Optional[str]` | Optional. Caption of the video to be sent, 0-1024 characters after entities parsing |
|
||||
| `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 |
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
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 request_contact, request_location, and request_poll are mutually exclusive.
|
||||
|
||||
Note: request_contact and request_location options will only work in Telegram versions released after 9 April, 2016. Older clients will receive unsupported message.
|
||||
Note: request_contact and request_location options will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message.
|
||||
|
||||
Note: request_poll option will only work in Telegram versions released after 23 January, 2020. Older clients will receive unsupported message.
|
||||
Note: request_poll option will only work in Telegram versions released after 23 January, 2020. Older clients will display unsupported message.
|
||||
|
||||
|
||||
## Attributes
|
||||
|
|
|
|||
|
|
@ -19,11 +19,11 @@ This object represents a message.
|
|||
| `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[send_to_message.mdMessReply to message with to_messageage]` | 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. |
|
||||
| `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. |
|
||||
| `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 |
|
||||
|
|
@ -40,6 +40,7 @@ This object represents a message.
|
|||
| `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 |
|
||||
| `dice` | `#!python Optional[Dice]` | Optional. Message is a dice with random value from 1 to 6 |
|
||||
| `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 |
|
||||
|
|
@ -55,7 +56,7 @@ This object represents a message.
|
|||
| `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[send_markup.mdInliReply to message with markupneKeyboardMarkup]` | Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons. |
|
||||
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons. |
|
||||
|
||||
|
||||
|
||||
|
|
@ -101,6 +102,7 @@ This methods has the same specification with the API but without `chat_id` and `
|
|||
- [aiogram.types.Audio](../types/audio.md)
|
||||
- [aiogram.types.Chat](../types/chat.md)
|
||||
- [aiogram.types.Contact](../types/contact.md)
|
||||
- [aiogram.types.Dice](../types/dice.md)
|
||||
- [aiogram.types.Document](../types/document.md)
|
||||
- [aiogram.types.Game](../types/game.md)
|
||||
- [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md)
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ This object represents a sticker.
|
|||
| `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 |
|
||||
| `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 |
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ This object represents a sticker set.
|
|||
| `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 |
|
||||
| `thumb` | `#!python Optional[PhotoSize]` | Optional. Sticker set thumbnail in the .WEBP or .TGS format |
|
||||
|
||||
|
||||
|
||||
|
|
@ -26,4 +27,5 @@ This object represents a sticker set.
|
|||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#stickerset)
|
||||
- [aiogram.types.PhotoSize](../types/photo_size.md)
|
||||
- [aiogram.types.Sticker](../types/sticker.md)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue