Skip to content
This repository was archived by the owner on Dec 23, 2024. It is now read-only.
Open
Changes from all commits
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
14 changes: 12 additions & 2 deletions pyrogram/methods/messages/forward_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ 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,
hide_author: bool = False,
hide_captions: bool = False
) -> Union["types.Message", List["types.Message"]]:
"""Forward messages of any kind.

Expand Down Expand Up @@ -62,6 +64,12 @@ async def forward_messages(
protect_content (``bool``, *optional*):
Protects the contents of the sent message from forwarding and saving.

hide_author (``bool``, *optional -> defualt = False*)
Hide the sender name if it is True.

hide_captions (``bool``, *optional```only works for medias``` -> defualt = False*)
Hide the captions of medias name if it is True.

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 +95,9 @@ 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=hide_author,
drop_media_captions=hide_captions
)
)

Expand Down