mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 18:19:34 +00:00
Add autogenerated docs for types and methods
This commit is contained in:
parent
a24708d589
commit
65331e1fda
166 changed files with 7361 additions and 4 deletions
64
docs/api/methods/send_media_group.md
Normal file
64
docs/api/methods/send_media_group.md
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
# sendMediaGroup
|
||||
|
||||
## Description
|
||||
|
||||
Use this method to send a group of photos or videos as an album. On success, an array of the sent Messages is returned.
|
||||
|
||||
|
||||
## 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) |
|
||||
| `media` | `#!python3 List[Union[InputMediaPhoto, InputMediaVideo]]` | A JSON-serialized array describing photos and videos to be sent, must include 2–10 items |
|
||||
| `disable_notification` | `#!python3 Optional[bool]` | Optional. Sends the messages silently. Users will receive a notification with no sound. |
|
||||
| `reply_to_message_id` | `#!python3 Optional[int]` | Optional. If the messages are a reply, ID of the original message |
|
||||
|
||||
|
||||
|
||||
## Response
|
||||
|
||||
Type: `#!python3 List[Message]`
|
||||
|
||||
Description: On success, an array of the sent Messages is returned.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
### As bot method bot
|
||||
|
||||
```python3
|
||||
result: List[Message] = await bot.send_media_group(...)
|
||||
```
|
||||
|
||||
### Method as object
|
||||
|
||||
Imports:
|
||||
|
||||
- `from aiogram.types import SendMediaGroup`
|
||||
- `from aiogram.api.types import SendMediaGroup`
|
||||
- `from aiogram.api.types.send_media_group import SendMediaGroup`
|
||||
|
||||
#### As reply into Webhook
|
||||
```python3
|
||||
return SendMediaGroup(...)
|
||||
```
|
||||
|
||||
#### With specific bot
|
||||
```python3
|
||||
result: List[Message] = await bot.emit(SendMediaGroup(...))
|
||||
```
|
||||
|
||||
#### In handlers with current bot
|
||||
```python3
|
||||
result: List[Message] = await SendMediaGroup(...)
|
||||
```
|
||||
|
||||
|
||||
## Related pages:
|
||||
|
||||
- [Official documentation](https://core.telegram.org/bots/api#sendmediagroup)
|
||||
- [aiogram.types.InputMediaPhoto](../types/input_media_photo.md)
|
||||
- [aiogram.types.InputMediaVideo](../types/input_media_video.md)
|
||||
- [aiogram.types.Message](../types/message.md)
|
||||
Loading…
Add table
Add a link
Reference in a new issue