action-react
is a tool that reacts to Telegram chat messages.
action-react
specifically listens to an account in a Telegram chat and makes corresponding http calls given the content of the message. This is inspired by tuixue.online-visa, a tool that periodically checks and publishes US consulate visa appointment availabilities across the world.
A possible application of this tool is to use it to listen to a Telegram bot publishing messages about new visa appointments, and makes http calls to the consulate appointment service to grab the desired spot.
Install the library's dependencies and build the library using:
pip install action-react
In your code, begin by importing the package:
from action-react import main
You can connect it to a telegram chat using:
main(api_id, api_hash, phone, username, target_date, cities)
For example, you can use main("123", "hash123", "+12345678901", "username", datetime.date(2022,2,2), ["boston", "houston"])
to start the function.
Alternatively, you can directly run python main.py
after setting up the configurations in config.ini
.