Automatic block stranger message request unless approved by owner. The script will automatically move message from people not in the "safeusers" to archive and auto reply a pre-defined message.
This script make use of Telethon library and is heavily motivated by the auto reply feature written by https://medium.com/@jiayu./automatic-replies-for-telegram-85075f28321
- Download and install Python3 from https://www.python.org/downloads/.
- Install Telethon by typing "python3 -m pip install telethon" on command prompt or terminal (Windows/Linux).
- Visit https://my.telegram.org/auth and login.
- Go to API development tool.
- Create an new app by giving it an app title and a short name.
- You will be directed to another page with "App api_id" and "App api_hash".
- Replace the "api_id", "api_hash", "phone", "session_file", "number_of_pinned_chat" in the script with your own values.
- Run the script.