Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 1.03 KB

README.md

File metadata and controls

23 lines (14 loc) · 1.03 KB

Telegram Bot Template

This is a template to make a Telegram bot on Python 3, it starts a few basic commands. It is intended for own usage, but you can use it if you want.

Usage

You can find real examples of this project layout on other repositories of mine, but here are the basics:

  • Install all requirements.txt

  • To run the bot you must put the bot token given by @botfather on the bot_tokens.py file. If you want to use payments put there the payment provider token as well. With this done, the bot will run with the basic commands.

  • Personalize the messages in the langs/ directory. If you want to add more languages or change the default you will have to do it on lang.py

  • To add more commands or change how the behave declare/modify functions in handlers.py

  • If you add more commands or need to get different Telegram Updates link the functions on handlers.py to the dispatcher on bot.py

  • If you want to create a database with sqlite, create it an use the database.py singleton to access it from any file.