Hello friends.
I want to present to your attention a Telegram bot that is written in Mikrotik Script and works in a router environment without using third-party services.
Its development became possible after one of the authors of Habr posted a library for public access, with which you can parse JSON objects into an associative array on Mikrotiks. The author's name is Alexander @Chupakabra303. Thank him very much for that. The author also has good articles on the study of variables and functions.
Also in terms of functions, there is excellent material on the same Habr from dear Sergey Sertik13. I highly recommend it to anyone who wants to understand this issue.
Well, having gathered together, including this knowledge, I wrote a bot, which now helps me a lot in my work. I started posting information on it on my channel. To all who are interested - welcome https://t.me/mikRobot_RU
The bot is modular, written using functions. Its first version was almost monolithic, which was very inconvenient from the point of view of debugging and updating. Functions solve this issue. Library functions for Telegram, such as SendMessage, EditMessage, etc. are also written. I plan to share them soon, as well as the main part of the code.
This is how it looks in the mikrotik itself
And this is the main window of the bot
More information on the channel.
Original post