maubot / plugin-wishlist

Wishlist for maubot plugins
9 stars 0 forks source link

moderator bot #24

Open williamkray opened 4 years ago

williamkray commented 4 years ago

something like the karmabot, but with additional functionality. the intention for this bot would be to have a room-specific scope for its functionality, for the purpose of automatically moderating a room via updates to user powerlevels.

proposed use case:

a room is created, and the bot is invited. the bot is granted a power level that allows it to affect the power level of other room members (moderator, for example). other users join the room. users enter with the room's default powerlevel, presumably granting the ability for that person to perform actions in the room (post messages, add widgets, etc) based on that power level and the room's settings.

users in the room react with either a positive or negative emoji to posts in the room. the bot tracks those reactions, and increases or decreases the user's power level between certain thresholds set in its config file (for example between -1 and +25). as the user's votes are tallied, the bot will alert them if they are about to cross a given threshold of powerlevel and potentially lose or gain permissions in the room. a user with perceived positive contributions to the room can be granted permissions just below the bot, while a user with perceived negative contributions can lose the ability to continue to contribute. users who cross the lower threshold and cannot post anything in the room must reach out to the room administrator for remediation.

the bot config file includes a blacklist/whitelist configuration for users that should not be moderated to avoid accidentally de-voicing trusted bots or users, etc.

stretch goal would be that the bot is able to execute an arbitrary scripts or webhooks (configurable in the maubot management interface) to trigger either internal or external events.

erkinalp commented 3 years ago

We already have https://github.com/matrix-org/mjolnir for moderation, which is already open source. How would this be different from mjolnir's mod capabilities?

williamkray commented 3 years ago

i'm sure that the fact that mjolnir exists and is open source would make this task potentially easier to transfer to a maubot plugin.

according to your logic, why develop nginx when apache already exists and is open source? just use apache. the purpose of maubot is to have a pluggable architecture for many different bot modules, and last i checked mjolnir is not a plugin for maubot, so until that changes this suggestion is valid.

tulir commented 3 years ago

Mjolnir also doesn't do democratic moderation, it's just a helper for cross-room moderation. The bot suggested here would do moderation based on voting.

subiol commented 3 years ago

I am also interested in a moderator bot for Matrix written in Python. Not particularly interested in the democratic part suggested here, more interested in the Python part.

We have someone with what it seems a bot that creates a new user and spams the same messages several times a day. Banning the user does nothing as he creates a new user every time. So I am looking to delete the messages as they pop up.

subiol commented 3 years ago

I was looking into creating a small bot that could solve the issue I described in the previous comment. I was looking at the code of reactbot and I was thinking that since it already has a rule, match and react system, it could be used as a base for a moderator bot. The bot right now only reacts by sending a comment, but other reactions like removing a comment, banning a user or whatever could be added.