Go to file
David 04ad3f0649 Minor bugfixes 2023-01-11 12:52:08 +01:00
src Minor bugfixes 2023-01-11 12:52:08 +01:00
tests Minor bugfixes 2023-01-11 12:52:08 +01:00
.gitignore Minor bugfixes 2023-01-11 12:52:08 +01:00
.gitlab-ci.yml Decreased expire time for artifacts 2023-01-03 18:43:00 +01:00
Cargo.toml Minor bugfixes 2023-01-08 18:54:57 +01:00
Dockerfile Fixed error in dockerfile 2023-01-08 16:51:44 +01:00
LICENSE Added readme and set license 2022-11-08 15:36:51 +01:00
README.md Updated documentation 2023-01-08 21:45:58 +01:00
example_config.ini Added detect long message spam 2023-01-10 16:40:32 +01:00

README.md

Matrix Modbot

Matrix Modbot is a bot for Matrix used to automatically moderate Matrix rooms.

Who is this bot for?

The bot is orientated towards admins of large Matrix rooms that are public and require constant moderation. With this bot, simple jobs such as swear filtering and spam prevention could be accomplished without intervention of human moderators. This project is still a work in progress, please feel free to PR and create issues if you find any.

How to run?

Using Docker: A minimal Docker image containing the compiled binary is published on Docker Hub. Note that this image is automatically pushed using a CI/CD Pipeline for every commit made to the main branch. Expect there to be bugs and breaking changes. sudo docker run -v /local/path/to/config.ini:/config.ini -t matrix-modbot:latest

Without root: docker run -v /local/path/to/config.ini:/config.ini -t matrix-modbot:latest

Using Cargo:

cargo build --release
cargo run /path/to/config.ini

Note that this bot will NOT run in an encrypted room. It also can only join 1 room at a time and isn't integrated with Element's Spaces feature. You must specify the room to join in the config file and invite the bot. You will also have to create an account for the bot and put the credentials into the config file.

Configuration

For configuration, see example_config.ini. The options should be self-explanatory.

Features

  • Easy to configure
  • Configurable swear detection
  • Spam detection (WIP)
  • Anti-Caps
  • Reputation system
    • All members of a room have reputation points, they are deducted when spam/swear/caps are detected
    • Automatically kicks a member if reputation is below -15
    • Members can award each other with maximum 1 reputation point every 24hr
      • Users with power level >= 50 are not affected (Mods and Admins)

Commands

For awarding someone reputation:

  • "!modbot award @user:matrix.org"

For deducting someone's reputation (moderators only):

  • "!modbot warn @user:matrix.org"

To get own reputation:

  • "!modbot reputation"