Skip to content

A simple template for an asynchronous telegram bot with webhooks to be hosted on the Heroku server.

License

Notifications You must be signed in to change notification settings

AlexanderKorataev/aiogram-bot-template

Repository files navigation

Aiogram bot template

✈️ 🐍 📃

A simple template for an asynchronous telegram bot with webhooks to be hosted on the Heroku server.

License: MIT Python: v3.10.5 Telegram: bot

photo_2022-07-13_17-04-20

Running on your PC 🚀

  1. Clone the GitHub repository.

    git clone https://github.com/AlexanderKorataev/aiogram-bot-template.git
  2. Create a virtual environment.

    python -m venv venv

    and activate

     . venv/bin/activate
  3. Install dependencies from requirements.txt.

    pip install -r requirements.txt
  4. Create environment variables TOKEN and DEBUG.

  5. Run the bot script.

    python polling.py

Dispatch to Heroku ☁

  1. Create a new application on Heroku and configure

    In the settings

    • Add a buildpack heroku/python
    • Add config vars DEBUG, TOKEN and HEROKU_APP_NAME
  2. Clone the GitHub repository.

    git clone https://github.com/AlexanderKorataev/aiogram-bot-template.git
  3. Create your Github repository and connect it to Heroku in the Deploy section.

File system 📁

folder purpose
handlers handlers of commands and messages sent to the telegram bot
keyboards bot keyboards
plugins plugins for adding functionality to the bot
settings project settings

About

A simple template for an asynchronous telegram bot with webhooks to be hosted on the Heroku server.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published