UNLICENSE License
This template and this README.md are (un)licensed under the terms of Unlicense.
pyproject.toml
, Makefile
and README.md
files.Makefile
file.Git
Makefile
Python 3.11
Poetry
EdgeDB
Docker
docker-compose
app
- main application directory.app/settings.py
- settings file; all values are taken from the environment variables.app/filters
- filters for routers and handlers.app/routers
- aiogram routers.app/routers/main.py
- main router, includes all other routers.app/models
- database models.app/middlewares
- aiogram middlewares.app/setup
- functions that will be called on startup.app/setup/setup.py
- main on startup function, calls all other functions.app/__main__.py
- main file, starts bot.scripts/run.sh
- Docker entrypoint; makes migrations and starts bot.This template uses rather strict linter settings. Please configure the linters as you wish.
mypy.ini
pyproject.toml#tool.ruff
and pyproject.toml#tool.ruff.mccabe
pyproject.toml#tool.black
The bot is configured using environment variables.
Possible environment variables are described in the example.env
file.
By default, the bot uses user language information from Telegram.
If you need to implement more complex logic, configure i18n middleware in app/setup/i18n.py
.
More on https://docs.aiogram.dev/en/dev-3.x/utils/i18n.html
By default, the bot uses MemoryStorage
and SimpleEventIsolation
.
Please configure storage in app/setup/storage.py
.
More on https://docs.aiogram.dev/en/dev-3.x/dispatcher/finite_state_machine/storages.html
Run make install
.
This command will
poetry
pre-commit
i18n
stuff.EdgeDB
project.You can find other usefully commands via make help
command.
make text-update
.app/{YOUR_LOCALES_DIR}/{LANG}/LC_MESSAGES/messages.po
.make text-compile
.text-create-language language=YOUR_LANGUAGE
.app/{YOUR_LOCALES_DIR}/{LANG}/LC_MESSAGES/messages.po
.make text-compile
.