My goal is to make a Telegram Bot using Python that does the following:
- The user types a command
- The bot explains what the user should type next.
- The user types certain information
- I use that info to fetch a value in a python dictionary.
- The bot replies with that info
I have already created the bot and set the command. The problem is that I don't know how to keep the bot "listening" . I have looked up in the docs but I have only found getUpdates, which gets the user's responses but only when you hit run.
res=requests.get(url=f"https://api.telegram.org/bot{bot_token}/getUpdates")
I would like to set a webhook, and I know there is a method for this but I'm not shure about how this works.