Automoderation (REGEX)

(#976) Feature Shipped moderation

Problem

Currently, we cannot use regex to automod certain words such as the n slur, f slur and the likes.

Proposed solution

Add a Discord style regex system for communities and servers to permit them to block words based on a regex patterns with optional default templates.

11 comments

Sign in with Fluxer to comment and vote.
Comment by @AntiliusSerbian
RexSystem 1 vote originally by @AntiliusSerbian on GitHub 1 reply
this doesnt seem like a good idea ngl
Comment by @AmilieDev
RexSystem 1 vote originally by @AmilieDev on GitHub OP
this doesnt seem like a good idea ngl
Adding words to a filter to stop people saying slurs is a bad idea?
Comment by @TheNamlessGuy
RexSystem 1 vote originally by @TheNamlessGuy on GitHub 7 replies
To me, this definitely feels like something that should be handled on a bot level.
Comment by @AmilieDev
RexSystem 1 vote originally by @AmilieDev on GitHub OP
Or just do it on a server level like Discord does and prevent the messages getting sent altogether.
Comment by @TheNamlessGuy
RexSystem 1 vote originally by @TheNamlessGuy on GitHub
If "discord did it" was a good metric, neither of us would be looking at this repository. I'm up for having my mind changed, but I'd need some arguments in that case. For example, how would you stop someone from setting up thousands of regexes (probably across several communities) filled with compute-intensive recursive lookaheads, and then having their botnet spam messages in said communities, allowing them to nuke servers?
Comment by @AmilieDev
RexSystem 1 vote originally by @AmilieDev on GitHub OP
If "discord did it" was a good metric, neither of us would be looking at this repository. I'm up for having my mind changed, but I'd need some arguments in that case. For example, how would you stop someone from setting up thousands of regexes (probably across several communities) filled with compute-intensive recursive lookaheads, and then having their botnet spam messages in said communities, allowing them to nuke servers?
A regex is server side. It's per server. Templates would be made by Fluxer themself.
Comment by @TheNamlessGuy
RexSystem 1 vote originally by @TheNamlessGuy on GitHub
I don't think Discord allows lookaheads I'm not a regex expert but this explains things well: discord/discord-api-docs#6860
Honestly, I thought discord rolled their own regex parser for that bit, which I was going to say seemed like a weird thing to spend time on for a project with a smaller userbase like this. But if it's a readily available and battle-tested rust crate, then sure. AFAIK there's no rust in the fluxer backend currently, so that might be a concern to look into as well (in terms of platform support, etc). There probably are packages for other languages, but they might not be as performant/battle tested.
A regex is server side. It's per server. Templates would be made by Fluxer themself.
All communities on the same server sharing the regex list seems like it would be a lot of headache for the main server in regards to slurs in other languages. Speaking of, do regexes work well for pictographic languages? Or can you go around saying the n-word in chinese without (immediate) repercussions?
Comment by @AmilieDev
RexSystem 1 vote originally by @AmilieDev on GitHub OP
> I don't think Discord allows lookaheads I'm not a regex expert but this explains things well: discord/discord-api-docs#6860 Honestly, I thought discord rolled their own regex parser for that bit, which I was going to say seemed like a weird thing to spend time on for a project with a smaller userbase like this. But if it's a readily available and battle-tested rust crate, then sure. AFAIK there's no rust in the fluxer backend currently, so that might be a concern to look into as well (in terms of platform support, etc). There probably are packages for other languages, but they might not be as performant/battle tested. > A regex is server side. It's per server. Templates would be made by Fluxer themself. All communities on the same server sharing the regex list seems like it would be a lot of headache for the main server in regards to slurs in other languages. Speaking of, do regexes work well for pictographic languages? Or can you go around saying the n-word in chinese without (immediate) repercussions?
Server as in individual communities, look in Community settings on Discord > Safety > Regex. Take a look at that, that's how it works. I don't think you understand Automod.
Comment by @TheNamlessGuy
RexSystem 1 vote edited originally by @TheNamlessGuy on GitHub
Server as in individual communities, look in Community settings on Discord > Safety > Regex. Take a look at that, that's how it works. I don't think you understand Automod.
I have used it in discord, yes. I was just confused by your usage of "server" instead of "community", since they're two vastly different things. EDIT: That means that your original reply doesn't answer the denial of service issue though, but I suppose @TheKodeToad answered that well enough.
Comment by @MymeType
RexSystem 1 vote originally by @MymeType on GitHub
Fully support this. I don't see the reason why anyone would be against the idea.