Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
1f847c5
started rewriting for rpc-bindings
missytake Dec 6, 2025
d058db5
basic uv setup
missytake Jan 4, 2026
bead56e
Run setupplugin + relayplugin directly after one another
missytake Jan 4, 2026
9094696
print QR code for invite link
missytake Jan 4, 2026
8f9fabb
added proper logging, fixed user-specified invite links
missytake Jan 4, 2026
693d6d1
stub for new relay plugin
missytake Jan 4, 2026
54ce6ba
handle system messages and commands in crew chat
missytake Jan 4, 2026
ea71585
forward messages between relay groups + outside chats
missytake Jan 4, 2026
2f3970f
uv format
missytake Jan 4, 2026
46dff26
offboard users
missytake Jan 4, 2026
39dfeec
get /new_message working a bit better
missytake Jan 4, 2026
7728210
remove legacy bot.py
missytake Jan 4, 2026
a9ec9af
fix: accidentally passed tuple, not int
missytake Jan 4, 2026
6b60056
pyinfra: adjust deployment to new features
missytake Jan 4, 2026
bb08277
pin delta-rpc version to 2.36.0, migrate from pickleDB
missytake Jan 5, 2026
7c1f88d
generate_invite: also accept legacy command
missytake Jan 6, 2026
11b0976
fix systemd unit
missytake Jan 6, 2026
2dad5f9
pyinfra: add deltachat-rpc-server to path
missytake Jan 6, 2026
20ae222
Migrate data from delta.sqlite + pickle.db to accounts.toml format
missytake Jan 7, 2026
7a5756b
pyinfra: chown needed for DB migration
missytake Jan 7, 2026
8233559
don't forward messages to outside chat, send a new proper msg
missytake Jan 7, 2026
2af3730
pyinfra: service should be less verbose
missytake Jan 7, 2026
488b08a
fix /new_message error message
missytake Jan 7, 2026
eaa3497
fix: during /new_message, only forward sent message to relay group.
missytake Jan 7, 2026
73bffc8
fix: success message
missytake Jan 7, 2026
759bd1f
new_message: try to create email contact if encryption isn't available
missytake Jan 7, 2026
557d5f6
new_message: if message is unencrypted, add only email contacts
missytake Jan 7, 2026
cc24361
fix: name can be empty
missytake Jan 7, 2026
f4911e7
relay groups: make creation message prettier
missytake Jan 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ __pycache__/
bot.db/
teams_bot_data/
team_bot_data/
testbot/
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
60 changes: 19 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,14 @@ with an email address
you want to use as a team:

```
team-bot init --email [email protected] --password p455w0rD
team-bot --email [email protected] --password p455w0rD
```

This command will show a QR code;
scan it with Delta Chat
At the beginning it will print an invite link;
open it with Delta Chat
to become part of the "team",
the verified group which manages the Team Bot.

Now to run it,
simply execute:

```
team-bot run -v
```

The bot only works as long as this command is running.
Read more about [running bots on
bots.delta.chat](https://bots.delta.chat/howto.html).
Expand All @@ -62,47 +55,32 @@ Just import it into your [deploy.py file](https://docs.pyinfra.com/en/2.x/gettin
from team_bot.pyinfra import deploy_team_bot

deploy_team_bot(
unix_user='root', # an existing UNIX user (doesn't need root or sudo privileges)
bot_email='[email protected]', # the email address your team wants to use
bot_passwd='p4ssw0rd', # the password to the email account
unix_user='root', # an existing UNIX user (doesn't need root or sudo privileges)
bot_email='[email protected]', # the email address your team wants to use
bot_passwd='p4ssw0rd', # the password to the email account
user_invite='https://i.delta.chat/#/... # the invite link of the first crew member
)
```

After you deployed it,
you need to do two steps manually:

First,
to initialize the bot,
create the crew,
and join the crew,
login to the user with ssh
and run:

```
export $(cat ~/.env | xargs) && ~/.local/lib/team-bot.venv/bin/team-bot init
```

Then,
to start the bot
and keep it running in the background,
run:

```
systemctl --user enable --now team-bot
```
If you didn't specify a `user_invite`,
you can initialize the bot
by scanning its QR code
or clicking its invite link
in the logs:

You can view the log output
You can view the logs
with `journalctl --user -fu team-bot`
to confirm that it works.
to view the QR code
and to check if something goes wrong.

## Development Environment

To get started with developing,
run:

```
python3 -m venv venv
. venv/bin/activate
pip install -e .[dev]
tox
uv venv
. .venv/bin/activate
uv pip install -e .[dev]
uv run tox
```
48 changes: 43 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,44 @@
[build-system]
requires = [
"setuptools>=42",
"wheel"
[project]
name = "team-bot"
version = "2.36.0"
description = "This bot connects your team to the outside and makes it addressable."
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"deltachat-rpc-client==2.36.0",
"deltachat-rpc-server==2.36.0",
"pickledb==0.9",
"qrcode>=8.2",
]
build-backend = "setuptools.build_meta"

[project.urls]
Repository = "https://github.com/deltachat-bot/team-bot/"
Issues = "https://github.com/deltachat-bot/team-bot/issues"

[tool.setuptools]
include-package-data = true

[tool.setuptools.packages.find]
where = ['src']

[project.scripts]
team-bot = "team_bot.main:main"

[project.optional-dependencies]
all = ["pytest", "pytest-env", "pytest-timeout", "pytest-xdist", "tox", "ruff", "pyinfra"]
dev = ["pytest", "pytest-env", "pytest-timeout", "pytest-xdist", "tox", "ruff",]
deploy = ["pyinfra"]

[tool.uv]
package = true

[tool.ruff]
lint.select = [
"F", # Pyflakes
"I", # isort

"PLC", # Pylint Convention
"PLE", # Pylint Error
"PLW", # Pylint Warning
]
line-length = 120
67 changes: 0 additions & 67 deletions setup.cfg

This file was deleted.

Loading
Loading