Go to file
Patrick Neff 6f1f9c598d Fix upload_keys 2020-08-06 19:47:25 +02:00
.vscode Run isort on save 2020-08-06 17:43:48 +02:00
matrix_bot Fix upload_keys 2020-08-06 19:47:25 +02:00
.editorconfig Rewrite bot 2020-08-05 23:13:23 +02:00
.gitignore Rewrite bot 2020-08-05 23:13:23 +02:00
.isort.cfg Add Plugin system 2020-08-06 17:16:43 +02:00
.pre-commit-config.yaml Add pre-commit hooks 2020-08-05 23:24:31 +02:00
Pipfile Add pre-commit hooks 2020-08-05 23:24:31 +02:00
Pipfile.lock Add pre-commit hooks 2020-08-05 23:24:31 +02:00
README.md fix upload_keys 2020-08-06 19:09:42 +02:00
setup.cfg Add pre-commit hooks 2020-08-05 23:24:31 +02:00
setup.py Rewrite bot 2020-08-05 23:13:23 +02:00

README.md

Matrix Bot

Uses matrix-nio

Requires libolm to be installed. in Debian this is done with apt install libolm-dev

Requiements

  • Python 3.8
  • libolm

Intallation

Create a virtualenv

mkdir MATRIX_BOT_DIR
virtualenv -p python3 venv
source venv/bin/activate
pip install https://git.gaja-group.com/gaja-group/matrix-bot

Configuration

The configuration is stored in $HOME/.config/matrix-bot/ and resides in directories within that directory. By default the configuration file will be loaded from the default profile folder, this can be changed by running matrix-bot -b PROFILE_NAME COMMANDS...

Usage

Before you can send encrypted messages you must verify the bot with the matrix homeserver. To to login and do this use matrix-bot verify

cd MATRIX_BOT_DIR
source venv/bin/activate
matrix-bot verify

After that you can begin sending messages

cd MATRIX_BOT_DIR
source venv/bin/activate
matrix-bot send '!yourRoomId' "Message Content"

Or start the bot in daemon mode. In this mode the bot will listen for defined events (not implemented yet)

cd MATRIX_BOT_DIR
source venv/bin/activate
matrix-bot run

When the bot is running and the socket plugin is active you can send messages via the running bot.

cd MATRIX_BOT_DIR
source venv/bin/activate
matrix-bot client send '!yourRoomId' "Message Content"