thedevs-network / the-guard-bot

The Guard, a Telegram bot to moderate groups.
https://t.me/thedevs_bot
GNU Affero General Public License v3.0
491 stars 162 forks source link

Reporting fixes #127

Closed C0rn3j closed 3 years ago

C0rn3j commented 3 years ago

This PR makes it so that all report messages are deleted if there is a report group.

This is a light breaking change, as some people joke with monospaced /report, which will now trigger, so such people will likely accidentally trigger a report once before they learn.

It also adds /admins and @report as a report command.

This PR also introduces a conflicting /admin, but the current real /admin command takes precedence and no real issue happens.

I hope the guy who snatched @report never joins our groups.


Ideally in the report system, the regex should be applied to the message of the reporter and if anything is left over, it should be added as a reason in the admin group, but I'll leave that for another PR some another time.

It is also lost in case the group has a report group.

But we didn't handle reasonings til now and I believe this is more consistent and a step towards the right direction.