Skip to content

A template that everyone can use to build custom automated telegram bots!

License

Notifications You must be signed in to change notification settings

noonosh/telegram-bot-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📑 Telegram Bot Template (TBT)

This is a template repo for cloning and reusing to create custom telegram bots with python-telegram-bot library in Python.

Installation & usage

  1. Clone the repo
$ git clone https://github.com/nuriddinislamov/telegram-bot-template my-bot
  1. Go to project directory, create virtualenv and activate it
$ cd my-bot; python3 -m venv venv; source venv/bin/activate
  1. Download and install all dependencies with pip
$ pip install -r requirements.txt
  1. Add an environment variable for bot's token. You can get one here with BotFather.

    • ❗️ Deprecated version

      $ export BOT_TOKEN='your actual token'
    • 👍 Recommended Create a file with name .env (no name, just .env) and type in your bot's token as:

      1. BOT_TOKEN='your actual token'


  2. 🎉 Great! Now run the bot and see the magic happen.

$ python3 bot.py

Licence

This template is under MIT license.

Copyright

© Nuriddin Islamov, 2021

About

A template that everyone can use to build custom automated telegram bots!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages