Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ghartakham/starter-python-telegram-bot

Repository files navigation

Python Telegram Bot Starter

This is simple Python Telegram Bot.

Deploy to Cyclic in seconds

Deploy to Cyclic

  1. Set server.py as your entry point.
  2. Create a new Telegram bot using BotFather
  3. Store the bot token into a BOT_TOKEN environment variable
  4. Create a SECRET_TOKEN and set it in the SECRET_TOKEN environment variable
  5. 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}"
    
  6. Message you bot with /start or just say Hello!
  7. Check your bot's status: https://api.telegram.org/bot${BOT_TOKEN}/getWebhookInfo

Run Locally

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

Helpful Docs:

Questions / Help

Join us on Discord: https://discord.cyclic.sh

Enjoy!

About

Cyclic Python Telegram Bot starter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

Languages

  • Python 96.8%
  • Shell 3.2%

AltStyle によって変換されたページ (->オリジナル) /