Pyrofork: Add protect_content parameter to copy_media_group method #36

This commit is contained in:
Ashok Bishnoi 2023-12-10 09:33:01 +05:30 committed by wulan17
parent f31271734f
commit 45cabf3c09
No known key found for this signature in database
GPG key ID: 318CD6CD3A6AC0A5

View file

@ -38,6 +38,7 @@ class CopyMediaGroup:
message_thread_id: int = None,
reply_to_message_id: int = None,
schedule_date: datetime = None,
protect_content: bool = None,
) -> List["types.Message"]:
"""Copy a media group by providing one of the message ids.
@ -80,6 +81,9 @@ class CopyMediaGroup:
schedule_date (:py:obj:`~datetime.datetime`, *optional*):
Date when the message will be automatically sent.
protect_content (``bool``, *optional*):
Protects the contents of the sent message from forwarding and saving
Returns:
List of :obj:`~pyrogram.types.Message`: On success, a list of copied messages is returned.
@ -133,6 +137,7 @@ class CopyMediaGroup:
multi_media=multi_media,
silent=disable_notification or None,
reply_to=reply_to,
noforwards=protect_content,
schedule_date=utils.datetime_to_timestamp(schedule_date)
),
sleep_threshold=60