Tennis Good Good Bot
A telegram bot based on a finite state machine,
which provide service of searching ATP / WTA rankings
also introduction of Tennis Grand Slam.
- Python 3
pip install -r requirements.txt
- pygraphviz (For visualizing Finite State Machine)
WEBHOOK_URL
in app.py MUST be set to proper values.
Otherwise, you might not be able to run your code.
You can either setup https server or using ngrok
as a proxy.
ngrok
would be used in the following instruction
./ngrok http 5000
After that, ngrok
would generate a https URL.
You should set WEBHOOK_URL
(in app.py) to your-https-URL/hook
.
python3 app.py
The initial state is set to user
.
-
user
-
state0
- Go Back: user
-
state1
-
state1_2
-
state1_3
-
state1_4
-
state2
- Reply: top 10 ATP ranking players & ask to see a specific player
- Input: ranking number (1~10)
- Go to: state2_2
-
state2_2
- Reply: picture of the corresponding player's & ask to see more info?
- Input: Yes / No
- Go to: state1_3 (Yes) / state0 (No)
-
state2_3
- Reply: more details about the player & ask to see more ATP players?
- Input: Yes / No
- Go to: state1_4 (Yes) / state0 (No)
-
state2_4
- Reply: a link for more info about WTA players
- Go back: state0
-
state3
-
state3_2
-
state3_3