Come realizzare un bot Telegram (uno dei tanti modi) – Best Telegram

NASA: Moon — False Color Mosaic

Come realizzare un bot Telegram (uno dei tanti modi)

Intro

Bot “pappagallo” in Python

import requests# raccolgo nella variabile `testo` ciò che gli utenti scriveranno in chat al bot
testo=Hook['params']['message']['text']# raccolgo la chat ID
chatID=Hook['params']['message']['chat']['id']# imposto l'URL per inviare i messaggi indietro al bot
URL='https://api.telegram.org/bot' + Hook['env']['parrot_bot_key'] + '/sendMessage'# invio indietro alla chat ID il messaggio ricevuto
richiesta=requests.get(URL,verify=False,data={'chat_id':chatID,'text':testo})
https://api.telegram.org/bot<TOKEN>/setWebhook?url=https://hook.io/<hook-user>/<hook-name>
{"ok":true,"result":true,"description":"Webhook was set"}

“hellomoon”, un bot basato sulle API della NASA

https://images-api.nasa.gov/search?media_type=image&q=palermo

Considerazioni finali

Letture consigliate

Ten articles before and after

The Zimmermann Telegram. The story of one of the biggest… – Best Telegram

Money For Knowledge: Distribution Via Telegram Quiz Bot – Best Telegram

Telegram bot for Hacking & Pentesting – Best Telegram

How Not to Get Hacked on Telegram – Best Telegram

Tensor Flow Object Detection over Telegram Bot, my breakfast, fruits and an interactive conversation – Best Telegram

Announcing Karma DAO: First-Ever Token-Permissioned Networking Chat Group on Telegram – Best Telegram

Binance Telegram AMA Session with the Holo Team Summary – Best Telegram

La storia d'amore tra canali Telegram e editoria è finita prima ancora di iniziare – Best Telegram

Considering the Telegram ICO? Proceed with caution – Best Telegram

Fight spam on your Telegram group with hCaptcha – Best Telegram