diff --git a/README.md b/README.md index 4b56cf3a..439733eb 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ Requires libolm to be installed. in Debian this is done with `apt install libolm ## Requiements -- Python 3.8 -- libolm +- Python 3.8 +- libolm ## Intallation @@ -32,3 +32,13 @@ After that you can begin sending messages source venv/bin/activate matrix-bot message "Message Content" # To send to the default room matrix-bot message -r '!yourRoomId' "Message Content" # To send to a specific room + +Or start the bot in daemon mode. In this mode the configured room will be monitored for incoming messages and you can send messages from external scripts with `matrix-botctl` + + cd MATRIX_BOT_DIR + source venv/bin/activate + matrix-bot + + # Then you can send messages with + + matrix-botctl message "Message Content" diff --git a/matrix_bot/botctl.py b/matrix_bot/botctl.py index e8d782f8..2cf375f8 100644 --- a/matrix_bot/botctl.py +++ b/matrix_bot/botctl.py @@ -27,7 +27,7 @@ def cli() -> None: @cli.command() @click.argument('message', nargs=-1) -def send(message: list) -> None: +def message(message: list) -> None: send_message(' '.join(message))