This bot is used as example of usage aiogram framework and as admin-helper in our community chats.
pipenv install --dev
.env.dist
to .env
file and change values in this filemake docker-up-db
make migrate
app
locales
migrations
app/__main__.py
(Can be executed as python -m app
)
...Before you will make commit need to run black
, isort
and Flake8
via command make lint
If you change Database models you will need to generate migrations: make migration message="do something"
Here listed only Docker deployment methods. That's mean you can't read here how to deploy the bot with other methods instead of Docker but you can do that manually.
Also this bot can't be normally started in Docker with polling mode because in this mode aiohttp server will be not started and healthcheck can not be started.
Pre-requirements: - Docker - docker-compose
Steps:
- Prepare .env
file
- ... (TODO)
- make app-create
- for first deploy, for updating or restarting
Stopping:
- make docker-stop
Destroying (with volumes):
- make docker-destroy
Pre-requirements:
- Docker (with activated swarm mode)
- traefik 2.0 in Docker (with overlay network named web
)
...
In Docker Swarm at Illemius with CI/CD
Steps: 1. GitHub Actions: 1. Build docker image 1. Publish it to the private Illemius Docker registry 1. Trigger Portainer webhook in the Illemius cluster via cURL 1. Portainer will trigger updating of the bot service 1. Docker run new instance of container at specified node 1. When container is started by first step it will run migrations 1. Docker wait until new instance will be healthy 1. Traefik watch Docker container and update the routes when new one is available 1. Stop old instance of Bot container
Bumps certifi from 2020.12.5 to 2022.12.7.
9e9e840
2022.12.07b81bdb2
2022.09.24939a28f
2022.09.14aca828a
2022.06.15.2de0eae1
Only use importlib.resources's new files() / Traversable API on Python ≥3.11 ...b8eb5e9
2022.06.15.147fb7ab
Fix deprecation warning on Python 3.11 (#199)b0b48e0
fixes #198 -- update link in license9d514b4
2022.06.154151e88
Add py.typed to MANIFEST.in to package in sdist (#196)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Bumps mako from 1.1.4 to 1.2.2.
Sourced from mako's releases.
1.2.2
Released: Mon Aug 29 2022
bug
[bug] [lexer] Fixed issue in lexer where the regexp used to match tags would not correctly interpret quoted sections individually. While this parsing issue still produced the same expected tag structure later on, the mis-handling of quoted sections was also subject to a regexp crash if a tag had a large number of quotes within its quoted sections.
References: #366
1.2.1
Released: Thu Jun 30 2022
bug
[bug] [tests] Various fixes to the test suite in the area of exception message rendering to accommodate for variability in Python versions as well as Pygments.
References: #360
misc
[performance] Optimized some codepaths within the lexer/Python code generation process, improving performance for generation of templates prior to their being cached. Pull request courtesy Takuto Ikuta.
References: #361
1.2.0
Released: Thu Mar 10 2022
changed
[changed] [py3k] Corrected "universal wheel" directive in
setup.cfg
so that building a wheel does not target Python 2.References: #351
[changed] [py3k] The
bytestring_passthrough
template argument is removed, as this flag only applied to Python 2.
... (truncated)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
This may help to prevent a wall of "xxx joined the group" messages, so only approved members are seen.
Bumps pycares from 3.1.1 to 4.2.0.
Sourced from pycares's releases.
4.2.0
What's Changed
- dependency update to c-ares by
@aviadhahami
in saghul/pycares#170New Contributors
@aviadhahami
made their first contribution in saghul/pycares#170Full Changelog: https://github.com/saghul/pycares/compare/pycares-4.1.2...pycares-4.2.0
4.1.2
Added support for Python 3.10.
4.1.1
Added support for Python 3.10.
4.1.0
Add support for Python 3.10.
4.0.0
- core: add support for CAA queries
- core: add support for getaddrinfo()
- doc: update README
- core: add ability to use the system installed c-ares
- misc: set version to 4.0.0
- test: remove TTL tests
- core: update c-ares and use a submodule
- core: drop bundled c-ares version
- misc: drop tasks.py
3.2.3
No release notes provided.
3.2.2
- Publish aarch64 wheels
3.2.1
No release notes provided.
3.2.0
- misc: add Python 3.9 classifier
- core: drop py3.5 from CI and documentation
- ci: run tests in Python 3.9
- ci: fix SDK path in appveyor
- ci: fix VS linker in appveyor
- ci: update python installer script in appveyor
- misc: add compiled windows dll to gitignore
- test: skip SOA non-ascii test due to changes in remote host
- test: fix broken chunked TXT test due to changes in remote host
- test: skip ANY test due to problems with mac
- ci: add action to release wheels to PyPi
... (truncated)
Sourced from pycares's changelog.
No longer updated. Please check the commits.
Version 4.0.0
- doc: uppdate README
- core: add support for CAA queries
- core: add support for getaddrinfo()
- doc: update README
- core: add ability to use the system installed c-ares
- misc: set version to 4.0.0
- test: remove TTL tests
- core: update c-ares and use a submodule
- core: drop bundled c-ares version
- misc: drop tasks.py
Version 3.2.0
- misc: add Python 3.9 classifier
- core: drop py3.5 from CI and documentation
- ci: run tests in Python 3.9
- ci: fix SDK path in appveyor
- ci: fix VS linker in appveyor
- ci: update python installer script in appveyor
- misc: add compiled windows dll to gitignore
- test: skip SOA non-ascii test due to changes in remote host
- test: fix broken chunked TXT test due to changes in remote host
- test: skip ANY test due to problems with mac
- ci: add action to release wheels to PyPi
- ci: drop AppVeyor
- ci: don't fail fast
- ci: stop testing on Travis
- test: add generic way to check for a CI
- test: relax check
- test: try to avoid spurious CI failures
- ci: test all platforms on GH actions
- ci: build wheels on GH Actions
- build: fix build error on macOS
- ci: explicitly set Python versions to build wheels for
- ci: update cibuildwheel
- ci: re-add IDNA test
7d62675
misc: update changelog5de6097
misc: set version to 4.2.0faab689
tests: ignoring 2 tests due to dead servers8026e66
tests: updated google TXT records for an outdated testf431164
deps: update bundled c-aresb1b9834
misc: set version to 4.1.2b6d517e
build: add PYPIREADME.rst to manifestf427967
misc: set version to 4.1.170820fc
misc: add PyPI README without imagesa856b20
misc: update c-ares URLDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
I am deploying a bot using docker-compose and every time I deploy it I see this error and of course the bot is not processing any messages.
Currently when a channel is banned, it's username is posted with leading @, making it clickable, which helps promoting such channels. I suggest removing the @ symbol so chat user won't be able to open that channel instantly.
Later another rule can be applied which replaces some symbols in usernames with asterisks (*)