Created
February 7, 2017 02:12
-
-
Save xavieryao/7a2c525b90738a997fdd207103021ec2 to your computer and use it in GitHub Desktop.
Always typing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from telethon import InteractiveTelegramClient | |
from telethon.tl.types.input_peer_chat import InputPeerChat | |
from telethon.tl.functions.messages.set_typing import SetTypingRequest | |
from telethon.tl.types.send_message_typing_action import SendMessageTypingAction | |
client = InteractiveTelegramClient('session_name','+8613400000000',api_id=123456,api_hash='752f79bb39d8004006f00f761dab7f00') | |
peer = InputPeerChat(14884418) | |
act = SendMessageTypingAction() | |
req = SetTypingRequest(peer=peer,action=act) | |
while True: | |
time.sleep(4) | |
client.invoke(req) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
哈哈哈哈哈哈