mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-21 22:56:38 +01:00
add link to InputMediaDocument
parent
72ea087255
commit
f46f5a93a7
1 changed files with 1 additions and 1 deletions
|
@ -89,7 +89,7 @@ Again, please check out the docs for details on required and optional arguments.
|
|||
---
|
||||
## Editing a file
|
||||
|
||||
When you have sent a file, you may want to edit it. This works similarly as `send_media_group`, i.e. the media must be wrapped into a `InputMedia<media_type>` object. Again, with `document` as example, we'll call [`bot.edit_message_media`](https://python-telegram-bot.readthedocs.io/telegram.bot.html#telegram.Bot.edit_message_media):
|
||||
When you have sent a file, you may want to edit it. This works similarly as `send_media_group`, i.e. the media must be wrapped into a `InputMedia<media_type>` object. Again, with `document` as example, we'll call [`bot.edit_message_media`](https://python-telegram-bot.readthedocs.io/telegram.bot.html#telegram.Bot.edit_message_media) and pass an instance of [`InputMediaDocument`](https://python-telegram-bot.readthedocs.io/telegram.inputmediadocument.html#telegram-inputmediadocument) as `media`:
|
||||
|
||||
```python
|
||||
await bot.edit_message_media(chat_id=chat_id, message_id=message_id, media=InputMediaDocument(media=open('tests/test.png'), ...))
|
||||
|
|
Loading…
Reference in a new issue