Update description of edit media methods

This commit is contained in:
KurimuzonAkuma 2024-11-02 20:11:13 +03:00
parent 9cbb707675
commit 10331d7a48
3 changed files with 10 additions and 6 deletions

View File

@ -27,10 +27,10 @@ class MessageEntityType(AutoName):
"``@username``"
HASHTAG = raw.types.MessageEntityHashtag
"``#hashtag``"
"``#hashtag`` or ``#hashtag@username``"
CASHTAG = raw.types.MessageEntityCashtag
"``$USD``"
"``$USD`` or ``$USD@username``"
BOT_COMMAND = raw.types.MessageEntityBotCommand
"``/start@pyrogrambot``"

View File

@ -39,7 +39,7 @@ class EditInlineMedia:
media: "types.InputMedia",
reply_markup: "types.InlineKeyboardMarkup" = None
) -> bool:
"""Edit inline animation, audio, document, photo or video messages.
"""Edit inline animation, audio, document, photo or video messages, or to add media to text messages.
When the inline message is edited, a new file can't be uploaded. Use a previously uploaded file via its file_id
or specify a URL.

View File

@ -40,10 +40,14 @@ class EditMessageMedia:
reply_markup: "types.InlineKeyboardMarkup" = None,
file_name: str = None
) -> "types.Message":
"""Edit animation, audio, document, photo or video messages.
"""Edit animation, audio, document, photo or video messages, or to add media to text messages.
If a message is a part of a message album, then it can be edited only to a photo or a video. Otherwise, the
message type can be changed arbitrarily.
If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise.
Otherwise, the message type can be changed arbitrarily.
.. note::
Business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.
.. include:: /_includes/usable-by/users-bots.rst