Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- from handler import handle_message
- while True:
- res = request.get("...")
- d = res.json()
- for elem in d["result"]:
- text = elem["message"]["text"]
- ans = handle_message(text)
- chat_id = elem["message"]["chat"]["id"]
- requests.post("...", params={ "chat_id": chat_id, "text": text } )
Add Comment
Please, Sign In to add comment