No description
Find a file
Kumi 5c1d165774
fix(logging): correct string formatting for lock/unlock messages
Corrected the string formatting in the logging and messaging code for user lock/unlock operations. Fixed the use of incorrect quotation marks which led to syntax errors and inconsistent message formats.

This ensures that log messages and notifications are properly formatted, enhancing readability and reducing potential debugging confusion.
2024-09-01 09:32:43 +02:00
.forgejo/workflows refactor(workflow): remove setup and test job 2024-08-17 15:51:04 +02:00
src/matrix_roomba fix(logging): correct string formatting for lock/unlock messages 2024-09-01 09:32:43 +02:00
.gitignore feat: introduce CI/CD workflow and packaging setup 2024-08-17 15:36:04 +02:00
config.dist.yaml fix(docs): correct grammar in configuration instructions 2024-08-09 12:12:40 +02:00
LICENSE feat: introduce CI/CD workflow and packaging setup 2024-08-17 15:36:04 +02:00
pyproject.toml chore: bump version to 0.1.2 2024-08-27 15:39:10 +02:00
README.md feat: introduce CI/CD workflow and packaging setup 2024-08-17 15:36:04 +02:00
requirements.txt feat: add RoombaBot for blocking/unblocking Matrix rooms 2024-08-07 10:28:30 +02:00

Matrix-Roomba

Support Private.coffee! PyPI PyPI - Python Version PyPI - License Latest Git Commit

Roomba is a moderation bot for Matrix, designed to help manage rooms and enforce content policies. The bot can block/unblock rooms, shut down rooms, and notify users of shutdowns. It integrates with Synapse's administrative API and supports optional encryption through Pantalaimon.

Installation

pip install matrix-roomba

Create a configuration file in config.yaml based on the config.dist.yaml provided in the repository.

At the very least, you need to provide the following configuration:

homeserver: "https://matrix.example.com"
user_id: "@roomba:example.com"
access_token: "YOUR_ACCESS_TOKEN"
moderation_room_id: "!moderation_room_id:example.com"

Ensure that the bot user is an admin on the homeserver, as it needs to be able to moderate rooms. Also add the user to the moderation room before starting the bot.

We recommend using pantalaimon as a proxy, because the bot itself does not support end-to-end encryption.

You can start the bot by running:

Usage

  1. Start the bot:
roomba
  1. Send a message to the moderation room to get a list of available commands:
!roomba

Commands

In the moderation room, send commands to manage rooms:

  • Block a room: !roomba block <room_id>
  • Unblock a room: !roomba unblock <room_id>
  • Shutdown a room: !roomba shutdown <room_id> [--purge]
  • For help: !roomba

License

This project is licensed under the MIT License - see the LICENSE file for details.