mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 20:14:51 +00:00
Pyrogram: add message_thread_id parameter to send_chat_action
Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
8428de1722
commit
aedade2ff2
1 changed files with 8 additions and 2 deletions
|
|
@ -26,7 +26,8 @@ class SendChatAction:
|
|||
async def send_chat_action(
|
||||
self: "pyrogram.Client",
|
||||
chat_id: Union[int, str],
|
||||
action: "enums.ChatAction"
|
||||
action: "enums.ChatAction",
|
||||
message_thread_id: int = None
|
||||
) -> bool:
|
||||
"""Tell the other party that something is happening on your side.
|
||||
|
||||
|
|
@ -41,6 +42,10 @@ class SendChatAction:
|
|||
action (:obj:`~pyrogram.enums.ChatAction`):
|
||||
Type of action to broadcast.
|
||||
|
||||
message_thread_id (```int```):
|
||||
Unique identifier for the target message thread (topic) of the forum.
|
||||
for forum supergroups only.
|
||||
|
||||
Returns:
|
||||
``bool``: On success, True is returned.
|
||||
|
||||
|
|
@ -75,6 +80,7 @@ class SendChatAction:
|
|||
return await self.invoke(
|
||||
raw.functions.messages.SetTyping(
|
||||
peer=await self.resolve_peer(chat_id),
|
||||
action=action
|
||||
action=action,
|
||||
top_msg_id=message_thread_id
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue