A Python-based Telegram bot for handling food orders and payments.
✅ Display menu items and prices
✅ Handle user orders and track order history
✅ Request user details like address
✅ Accept payment receipt uploads
✅ Admin approval system for orders
First, clone this repo to your local machine:
git clone https://github.com/yourusername/telegram-order-bot.git
cd telegram-order-botEnsure you have Python 3.10+ installed. Then, install the required libraries:
pip install -r requirements.txtOpen Telegram and search for BotFather.
Instead of storing the bot token in the code, use an .env file (or GitHub Secrets).
Create a .env file in the root directory:
BOT_TOKEN=your-telegram-bot-token
ADMIN_ID=your-admin-user-idThis repository includes a GitHub Actions workflow (.github/workflows/bot.yml) to automatically run the bot when pushing updates.
⚙️ Setting Up GitHub Actions
Go to Settings → Actions Select Allow all actions and reusable workflows
This repository includes a workflow to run the bot on GitHub Actions. It is located at:
.github/workflows/bot.yml✅ Installs Python and dependencies
✅ Runs the bot script (bot.py) when you push changes
✅ Stops execution after running (not 24/7)
To manually run the bot from GitHub Actions:
Go to the "Actions" tab in your repository. Select the workflow and click "Run workflow".
After setting everything up, you can start the bot manually:
python bot.pySince GitHub Actions does not keep your bot running, you should deploy it to a cloud service like:
✅ Heroku (Free but has limitations)
✅ Railway.app (Free, easy setup)
✅ Render.com
✅ VPS (AWS / Google Cloud / DigitalOcean) (For full control)