Writing a Simple Telegram Bot
Based on the requests of DN42 Telegram Group members, I plan to add Telegram Bot support to my Bird Looking Glass, so it is easier for them to look up whois information, testing networks and finding sources of route leaks. The bot is supposed to recognize commands starting with /, and respond to the message.My Looking Glass is written in Go, so at the beginning, I looked for Telegram Bot APIs in the Go language. However, those popular API libraries all use the same scheme for handling requests:Telegram server sends a callback to my own server;My program handles the request and may send multiple requests actively to the Telegram server, authenticated with a locally configured Token;Finally, the program actively sends a request to the Telegram server to send the response.While powerful,...