Add missing caption_entities parameter to send_cached_media
This commit is contained in:
parent
de0b215f8d
commit
6f878949e1
@ -16,7 +16,7 @@
|
|||||||
# You should have received a copy of the GNU Lesser General Public License
|
# You should have received a copy of the GNU Lesser General Public License
|
||||||
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from typing import Union
|
from typing import Union, List
|
||||||
|
|
||||||
from pyrogram import raw
|
from pyrogram import raw
|
||||||
from pyrogram import types
|
from pyrogram import types
|
||||||
@ -31,6 +31,7 @@ class SendCachedMedia(Scaffold):
|
|||||||
file_id: str,
|
file_id: str,
|
||||||
caption: str = "",
|
caption: str = "",
|
||||||
parse_mode: Union[str, None] = object,
|
parse_mode: Union[str, None] = object,
|
||||||
|
caption_entities: List["types.MessageEntity"] = None,
|
||||||
disable_notification: bool = None,
|
disable_notification: bool = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
schedule_date: int = None,
|
schedule_date: int = None,
|
||||||
@ -67,6 +68,9 @@ class SendCachedMedia(Scaffold):
|
|||||||
Pass "html" to enable HTML-style parsing only.
|
Pass "html" to enable HTML-style parsing only.
|
||||||
Pass None to completely disable style parsing.
|
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*):
|
disable_notification (``bool``, *optional*):
|
||||||
Sends the message silently.
|
Sends the message silently.
|
||||||
Users will receive a notification with no sound.
|
Users will receive a notification with no sound.
|
||||||
@ -99,7 +103,7 @@ class SendCachedMedia(Scaffold):
|
|||||||
random_id=self.rnd_id(),
|
random_id=self.rnd_id(),
|
||||||
schedule_date=schedule_date,
|
schedule_date=schedule_date,
|
||||||
reply_markup=reply_markup.write() if reply_markup else None,
|
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)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user