Skip to content

poshl000/telegram-webapp-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

telegram-webapp-bot

Telegram Web App bot example.

Bot consists of two parts:

  • webapp-backend
  • webapp-frontend

Installation

webapp-backend

Built with pyTelegramBotAPI and peewee orm

  1. Execute in database directory to create sqlite file to work with peewee:
python3 create_database.py
  1. Set telegram bot key in config/config.ini
  2. Edit products price in config/products.yml
  3. Run bot using
python3 bot.py

Note that bot use infinity_polling so need to started i background. Use tools like Monit for control bot script.

webapp-frontend

Simpe interface built with react and react-bootstrap

  1. Set products data in src/catalog/state.js
  2. Run npm start for test
  3. npm run build for build