Pyrogram: Add message_thread_id parameter to copy_message method

Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
wulan17 2022-12-09 17:40:38 +07:00
parent 6edc4256c3
commit 9f32305c3a
No known key found for this signature in database
GPG key ID: 318CD6CD3A6AC0A5

View file

@ -36,6 +36,7 @@ class CopyMessage:
parse_mode: Optional["enums.ParseMode"] = None,
caption_entities: List["types.MessageEntity"] = None,
disable_notification: bool = None,
message_thread_id: int = None,
reply_to_message_id: int = None,
schedule_date: datetime = None,
protect_content: bool = None,
@ -83,6 +84,10 @@ class CopyMessage:
Sends the message silently.
Users will receive a notification with no sound.
message_thread_id (``int``, *optional*):
Unique identifier for the target message thread (topic) of the forum.
for forum supergroups only.
reply_to_message_id (``int``, *optional*):
If the message is a reply, ID of the original message.
@ -114,7 +119,7 @@ class CopyMessage:
parse_mode=parse_mode,
caption_entities=caption_entities,
disable_notification=disable_notification,
reply_to_message_id=reply_to_message_id,
reply_to_message_id=reply_to_message_id or message_thread_id,
schedule_date=schedule_date,
protect_content=protect_content,
reply_markup=reply_markup