PyroFork: add drop_author parameter to forward_messages method

Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
kvrvgv 2023-03-13 06:20:45 +03:00 committed by wulan17
parent bafef3d71e
commit 84a41e9aa2
No known key found for this signature in database
GPG key ID: 318CD6CD3A6AC0A5

View file

@ -33,7 +33,8 @@ class ForwardMessages:
message_thread_id: int = None,
disable_notification: bool = None,
schedule_date: datetime = None,
protect_content: bool = None
protect_content: bool = None,
drop_author: bool = None
) -> Union["types.Message", List["types.Message"]]:
"""Forward messages of any kind.
@ -67,6 +68,9 @@ class ForwardMessages:
protect_content (``bool``, *optional*):
Protects the contents of the sent message from forwarding and saving.
drop_author (``bool``, *optional*):
Forwards messages without quoting the original author
Returns:
:obj:`~pyrogram.types.Message` | List of :obj:`~pyrogram.types.Message`: In case *message_ids* was not
a list, a single message is returned, otherwise a list of messages is returned.
@ -93,7 +97,8 @@ class ForwardMessages:
silent=disable_notification or None,
random_id=[self.rnd_id() for _ in message_ids],
schedule_date=utils.datetime_to_timestamp(schedule_date),
noforwards=protect_content
noforwards=protect_content,
drop_author=drop_author
)
)