No description
Find a file
Kumi 1d2e3ec013
All checks were successful
Python Package CI/CD / Publish to PyPI (push) Successful in 47s
fix: Missing functions
2025-04-09 10:06:51 +02:00
.forgejo/workflows chore(deps): update node.js to v22 2025-03-06 08:43:08 +00:00
src/matrix_roomba fix: Missing functions 2025-04-09 10:06:51 +02:00
.gitignore feat: Added debug mode, help output 2025-04-09 09:49:34 +02:00
config.dist.yaml feat: Added debug mode, help output 2025-04-09 09:49:34 +02:00
LICENSE feat: introduce CI/CD workflow and packaging setup 2024-08-17 15:36:04 +02:00
pyproject.toml fix: Missing functions 2025-04-09 10:06:51 +02:00
README.md feat: Added debug mode, help output 2025-04-09 09:49:34 +02:00
renovate.json Add renovate.json 2025-03-06 07:25:39 +00: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

Configuration

The following configuration options are available:

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

# Debug mode - set to true for verbose logging
debug: false

# If your moderation room is encrypted, use Pantalaimon:
pantalaimon:
  homeserver: "http://localhost:8010"
  access_token: "YOUR_PANTALAIMON_ACCESS_TOKEN"

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.

Debug Mode

You can enable debug mode in two ways:

  1. Set debug: true in your config.yaml file for persistent debug logging
  2. Use the !roomba debug command in the moderation room to toggle debug mode at runtime

When debug mode is enabled, the bot will output detailed logs about:

  • API requests and responses
  • Room and user information
  • Command processing
  • Matrix client operations

This is useful for troubleshooting issues with the bot or understanding its behavior.

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.