- Creates service orders via Telegram dialog
- Opens a styled Telegram Web App mini application
- Stores orders in SQLite
- Sends each order to admins
- Lets admins change order status with inline buttons
- Create and activate a virtual environment
- Install dependencies:
pip install -r requirements.txt- Copy
.env.exampleto.envand fill in:
BOT_TOKENADMIN_IDSas comma-separated Telegram user IDsWEBAPP_URLWEB_HOSTWEB_PORT
- Run the bot:
python3 main.pyThe bot runs both Telegram polling and the built-in web server for the mini app.
/startshows the main menu with an app button- User can open the mini app inside Telegram
- User fills in the styled order form
- Bot saves the order and sends it to admins
- Admin receives each new order
- Admin can change the status to:
newin_progressdonecanceled
For the mini app to open inside Telegram on real devices, WEBAPP_URL should be a public HTTPS URL.
For local browser testing, http://127.0.0.1:8080 is enough.
This project includes render.yaml.
For Render deployment:
BOT_TOKEN= your bot tokenADMIN_IDS= your numeric Telegram IDWEBAPP_URL= your Render HTTPS URL, for examplehttps://telegram-mcoc-bot.onrender.com
PORT is provided by Render automatically. The app already supports it.