有没有办法在电视节目中发送 "User is typing..." 状态?

Is there a way to send "User is typing..." status in telethon?

我想向一个实体发送更新,该实体将在他们(收件人)方面显示为 "X is typing..."(X 是我)。我查看了文档(尤其是在 telethon.client 包下),但找不到执行此操作的方法。是否可以使用 telethon 发送此类更新?

您要查找的函数是SetTypingRequest。在这里阅读更多相关信息:

https://lonamiwebs.github.io/Telethon/methods/messages/set_typing.html

示例:

from telethon.sync import TelegramClient
from telethon import functions, types

with TelegramClient(name, api_id, api_hash) as client:
    result = client(functions.messages.SetTypingRequest(
        peer='username',
        action=types.SendMessageTypingAction()
    ))
    print(result)

不要忘记在一段时间后取消打字动作;你可能不想永远打字:-D

https://lonamiwebs.github.io/Telethon/constructors/send_message_cancel_action.html