Skip to main content

A Matrix bot that helps you shut down rooms

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

matrix_roomba-0.1.4.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

matrix_roomba-0.1.4-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file matrix_roomba-0.1.4.tar.gz.

File metadata

  • Download URL: matrix_roomba-0.1.4.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for matrix_roomba-0.1.4.tar.gz
Algorithm Hash digest
SHA256 9b3fac8a5a2ff89364868f8cab5e1070d5cd0334dc237bcb10db43eb746c2ef2
MD5 7bb4de7ffc112b39e1661d51141622ba
BLAKE2b-256 ba916736296fca26fbd32d8cd268e7729de53bcde192deb9c0a237bf67bcfc79

See more details on using hashes here.

File details

Details for the file matrix_roomba-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for matrix_roomba-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 33fbcad97387ab1603d66ee8a0bde8691bc8c25a11856b24fa17070504477c3f
MD5 cecb90758682f8a2b18a01fa10a65674
BLAKE2b-256 bcab112c0cde86832784014e8a94d385d31cedeaf22d1641b980fe8578982551

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page