Skip to content
This repository was archived by the owner on Dec 23, 2024. It is now read-only.
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add drop_author parameter in methods/.../forward_messages.py
  • Loading branch information
kvrvgv committed Mar 13, 2023
commit 166dbffce85b84ea4ed585937331c1f8b0609363
9 changes: 7 additions & 2 deletions pyrogram/methods/messages/forward_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ async def forward_messages(
message_ids: Union[int, Iterable[int]],
disable_notification: bool = None,
schedule_date: datetime = None,
protect_content: bool = None
protect_content: bool = None,
drop_author: bool = None
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

function parameter
if True - author will be hidden

) -> Union["types.Message", List["types.Message"]]:
"""Forward messages of any kind.

Expand Down Expand Up @@ -62,6 +63,9 @@ async def forward_messages(
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
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docstring for new param


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.
Expand All @@ -87,7 +91,8 @@ async def forward_messages(
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
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pass parameter to raw.functions.messages.ForwardMessages

)
)

Expand Down