diff --git a/pyrogram/methods/messages/send_cached_media.py b/pyrogram/methods/messages/send_cached_media.py index bc7b2f15..09fd96cd 100644 --- a/pyrogram/methods/messages/send_cached_media.py +++ b/pyrogram/methods/messages/send_cached_media.py @@ -16,7 +16,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with Pyrogram. If not, see . -from typing import Union +from typing import Union, List from pyrogram import raw from pyrogram import types @@ -31,6 +31,7 @@ class SendCachedMedia(Scaffold): file_id: str, caption: str = "", parse_mode: Union[str, None] = object, + caption_entities: List["types.MessageEntity"] = None, disable_notification: bool = None, reply_to_message_id: int = None, schedule_date: int = None, @@ -67,6 +68,9 @@ class SendCachedMedia(Scaffold): Pass "html" to enable HTML-style parsing only. Pass None to completely disable style parsing. + caption_entities (List of :obj:`~pyrogram.types.MessageEntity`): + List of special entities that appear in the caption, which can be specified instead of __parse_mode__. + disable_notification (``bool``, *optional*): Sends the message silently. Users will receive a notification with no sound. @@ -99,7 +103,7 @@ class SendCachedMedia(Scaffold): random_id=self.rnd_id(), schedule_date=schedule_date, reply_markup=reply_markup.write() if reply_markup else None, - **await self.parser.parse(caption, parse_mode) + **await utils.parse_text_entities(self, caption, parse_mode, caption_entities) ) )