Skip to content

Commit

Permalink
Merge pull request #36 from Abishnoi69/main
Browse files Browse the repository at this point in the history
added `protect_content`
  • Loading branch information
wulan17 authored Dec 12, 2023
2 parents 7645b96 + 75c8cc0 commit 0b131cc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pyrogram/methods/messages/copy_media_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ async def copy_media_group(
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.
Expand Down Expand Up @@ -80,6 +81,9 @@ async def copy_media_group(
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.
Expand Down Expand Up @@ -133,7 +137,8 @@ async def copy_media_group(
multi_media=multi_media,
silent=disable_notification or None,
reply_to=reply_to,
schedule_date=utils.datetime_to_timestamp(schedule_date)
noforwards=protect_content,
schedule_date=utils.datetime_to_timestamp(schedule_date)
),
sleep_threshold=60
)
Expand Down

0 comments on commit 0b131cc

Please sign in to comment.