Stupidly simple Python script that will make your Telegram account appear as "typing..." every time you receive a "typing..." update from another account (or chat).
- install the requirements with
pip install -r requirements.txt
- copy
config.example.toml
and rename it toconfig.toml
- fill the
pyrogram
section ofconfig.toml
with the required values (get yourapi_id
andapi_hash
from https://my.telegram.org/apps - see Pyrogram's great docs for more information) - start the script with
python main.py
- login to your Telegram account: insert the verification code you received on your Telegram apps, and insert your 2SV password if you have one set
There's a number of "typing..."-like actions that an account can perform on Telegram. The supported ones are listed in the updates
section of config.toml
: from there, you can configure to which of these actions your account should react. You can also configure whether to ignore updates coming from private chats or group chats.
By default, the script only answers to "typing", "recording voice message" and "recording video message" updates coming from private chats.
A Telegram account will always receive "typing..."-like updates from accounts for which it can access the last seen time. For all the other users that hide their last seen time (or that have their last seen hidden because you don't share yours), your Telegram account will receive "typing..."-like updates only if there has been a very recent exchange of messages (be it in the private chat with the user, or in a common group), or the user marked as read one of your private messages.
This script will answer every "typing..."-like update your account receives by sending the same "typing..."-like update to the sending peer, once per received update. The "typing..." status lasts on the receiver's Telegram app for 6 seconds, unless the action is explicitly prematurely canceled by the account that sent the request.
This information might be incomplete, outdated, or straight-up wrong. Telegram works in misterious ways and things are often subject to changes.
Logs are stored in the logs
directory. By default, they keep a non-verbose log of sent requests.
I once saw a Twitter screenshot in a Telegram channel mirroring a subreddit, explaining this concept as a Slack bot. So I thought I could make the same thing but for Telegram.