This template can be used for telegram bots written using the python-telegram-bot library.
Detailed materials on creating bots can be found in the documentation and wiki.
src/
├── tgbot/
│ ├── assets/
│ ├── handlers/
│ ├── services/
│ ├── templates/
│ ├── utils/
│ ├── __init__.py
│ └── config.py
├──.env.example
└── bot.py
tgbot/
- the root package, which contains the other sub-packages and files necessary for the bot's operationassets/
- resources that can be used in the bot, such as images, logoshandlers/
- handlers that respond to the actions of bot usersservices/
- the business logic of the bottemplates/
- to avoid writing text in handlers, the message templates are placed in a separate moduleutils/
- other support modulesconfig.py
- configuration file.env.example
- file with environment variables, you need to rename it to.env
and insert your bot's token into itbot.py
- entry point for the bot, performs preparatory operations and launches the bot
A more detailed description and documentation of all bot functions are in the template.
Available under MIT license