mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-03 14:04:51 +00:00
Pyrofork: Add protect_content parameter to copy_media_group method #36
This commit is contained in:
parent
f31271734f
commit
45cabf3c09
1 changed files with 6 additions and 1 deletions
|
|
@ -38,6 +38,7 @@ class CopyMediaGroup:
|
||||||
message_thread_id: int = None,
|
message_thread_id: int = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
|
protect_content: bool = None,
|
||||||
) -> List["types.Message"]:
|
) -> List["types.Message"]:
|
||||||
"""Copy a media group by providing one of the message ids.
|
"""Copy a media group by providing one of the message ids.
|
||||||
|
|
||||||
|
|
@ -80,6 +81,9 @@ class CopyMediaGroup:
|
||||||
schedule_date (:py:obj:`~datetime.datetime`, *optional*):
|
schedule_date (:py:obj:`~datetime.datetime`, *optional*):
|
||||||
Date when the message will be automatically sent.
|
Date when the message will be automatically sent.
|
||||||
|
|
||||||
|
protect_content (``bool``, *optional*):
|
||||||
|
Protects the contents of the sent message from forwarding and saving
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
List of :obj:`~pyrogram.types.Message`: On success, a list of copied messages is returned.
|
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,
|
multi_media=multi_media,
|
||||||
silent=disable_notification or None,
|
silent=disable_notification or None,
|
||||||
reply_to=reply_to,
|
reply_to=reply_to,
|
||||||
|
noforwards=protect_content,
|
||||||
schedule_date=utils.datetime_to_timestamp(schedule_date)
|
schedule_date=utils.datetime_to_timestamp(schedule_date)
|
||||||
),
|
),
|
||||||
sleep_threshold=60
|
sleep_threshold=60
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue