This is simple Python Telegram Bot.
- Set
server.py
as your entry point. - Create a new Telegram bot using BotFather
- Store the bot token into a BOT_TOKEN environment variable
- Create a SECRET_TOKEN and set it in the SECRET_TOKEN environment variable
- Run the following curl substituting the appropriate variables:
curl https://api.telegram.org/bot${BOT_TOKEN}/setWebhook -F "url=https://${CYCLIC_URL}/webhook/" \ -F "secret_token=${SECRET_TOKEN}"
- Message you bot with
/start
or just sayHello!
- Check your bot's status:
https://api.telegram.org/bot${BOT_TOKEN}/getWebhookInfo
Prerequisites:
- pyenv
- python 3.10.11
Install: bin/install
- creates virtual env
- installs dependencies from
requirements.txt
Run: bin/dev
- runs a
uvicorn
server in reload mode
Run: bin/start
- runs a
uvicorn
server
Join us on Discord: https://discord.cyclic.sh
Enjoy!