diff --git a/pyrogram/enums/message_entity_type.py b/pyrogram/enums/message_entity_type.py index 4db75f93..7fe52221 100644 --- a/pyrogram/enums/message_entity_type.py +++ b/pyrogram/enums/message_entity_type.py @@ -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``" diff --git a/pyrogram/methods/messages/edit_inline_media.py b/pyrogram/methods/messages/edit_inline_media.py index 20a8754f..b5489862 100644 --- a/pyrogram/methods/messages/edit_inline_media.py +++ b/pyrogram/methods/messages/edit_inline_media.py @@ -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. diff --git a/pyrogram/methods/messages/edit_message_media.py b/pyrogram/methods/messages/edit_message_media.py index 2ebec1ea..085534a6 100644 --- a/pyrogram/methods/messages/edit_message_media.py +++ b/pyrogram/methods/messages/edit_message_media.py @@ -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