Telegram chat bot


The goal of the project: to study the basic capabilities of Telegram chatbots. Implemented functions:

  • Creating a command menu
  • Creating an inline keyboard
  • Sending messages to the bot
  • Receiving messages, commands and callbacks
  • Creating questionnaires and receiving graphical results
  • Recording all activity in the database
  • Deleting messages from the bot
  • Launching the telegram web application
  • Communicating with the web application

The bot is available at link
Libraries used: irazasyed (basic for working with telegram), jpgraph (for creating a graph), the web application is made in the form of a regular HTML page, JQuery and JQuery UI libraries are added to it.
The bot is serviced by a PHP program that runs on my hosting in a window (screen) of the operating system. The server requests messages every 5 seconds. I decided to make only this one option for now, so as not to lose messages in case of program or connection failures. The following general scheme works: