mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-01 05:04:51 +00:00
PyroFork: add drop_author parameter to forward_messages method
Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
bafef3d71e
commit
84a41e9aa2
1 changed files with 7 additions and 2 deletions
|
|
@ -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
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue