This is simple Python Telegram Bot.
- Set
server.pyas 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
/startor 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
uvicornserver in reload mode
Run: bin/start
- runs a
uvicornserver
Join us on Discord: https://discord.cyclic.sh
Enjoy!