2020-08-03 18:32:53 +02:00
|
|
|
# Matrix Bot
|
|
|
|
|
|
|
|
Uses [matrix-nio](https://github.com/poljar/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
|
|
|
|
|
2020-08-03 18:44:27 +02:00
|
|
|
mkdir MATRIX_BOT_DIR
|
2020-08-03 18:32:53 +02:00
|
|
|
virtualenv -p python3 venv
|
2020-08-03 18:44:27 +02:00
|
|
|
source venv/bin/activate
|
|
|
|
pip install https://git.gaja-group.com/gaja-group/matrix-bot
|
2020-08-03 18:32:53 +02:00
|
|
|
|
|
|
|
## 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`
|
|
|
|
|
2020-08-03 18:44:27 +02:00
|
|
|
cd MATRIX_BOT_DIR
|
|
|
|
source venv/bin/activate
|
2020-08-03 18:32:53 +02:00
|
|
|
matrix-bot verify
|
|
|
|
|
|
|
|
After that you can begin sending messages
|
|
|
|
|
|
|
|
source MATIRX_BOT_DIR/venv/bin/activate
|
|
|
|
cd
|
|
|
|
matrix-bot message "Message Content" # To send to the default room
|
|
|
|
matrix-bot message -r '!yourRoomId' "Message Content" # To send to a specific room
|