A Telegram bot Python 3.7+ app use Vercel as Serverless Function!
pip install -r requirements.txt
pip install -r requirements-dev.txt
vercel dev
Or running without vercel.
# without webhook
python -m app
# with webhook
python -m api.bot
# index webpage
python -m api.index
Linting and format code.
./lint.sh
At .env
file or configure at vercel.
BOT_API_TOKEN=123456789:AbCdfGhIJKlmNoQQRsTUVwxyZ
WEBHOOK_HOST=https://{project_name}.vercel.app
SERVERLESS=True
This bot was built using aiogram. Currently this bot doesn't run perfectly because vercel runtime @vercel/python
does not use Python 3.7+. When access /api/bot
you got errors:
[GET] /api/bot
Unable to import module 'now__handler__python': Your Python version 3.6.12 is not supported by aiogram, please install Python 3.7+
Why? It's because aiogram
required Python 3.7+ and currently vercel use Python 3.6.12.
Stay tune, hopefully this request accepted.
This project is licensed under the MIT License. See the LICENSE file for details.