revanced-discord-bot icon indicating copy to clipboard operation
revanced-discord-bot copied to clipboard

feat: use `censor` to cure names with slurs

Open Ushie opened this issue 1 year ago • 5 comments

Ushie avatar Apr 11 '23 17:04 Ushie

If this PR is not complete yet, mark it as a draft.

It is complete

Ushie avatar Apr 12 '23 09:04 Ushie

IMO the word ass should be excluded from the list, as it filters benign words such as pass and class, which, given the context of the server, are to be expected in nicknames/usernames.

I dont believe words like that will be effected, but I'm all for excluding ass

Ushie avatar Apr 18 '23 16:04 Ushie

@oSumAtrIX can you review?

Ushie avatar May 11 '23 22:05 Ushie

IMO the word ass should be excluded from the list, as it filters benign words such as pass and class, which, given the context of the server, are to be expected in nicknames/usernames.

I dont believe words like that will be effected, but I'm all for excluding ass

use censor::*;

fn main() {
    let censor = Censor::Standard;
    println!("{}", censor.check("passport"));
}

from my testing, this code returns true. But anyway, such edge-cases are limited pretty much just to the word ass, I've done some grepping through dictionaries and couldn't find a similar case for other blacklisted words.

badawoll avatar May 13 '23 01:05 badawoll

@Ushie Please check if everything works correctly.

oSumAtrIX avatar Jul 06 '23 21:07 oSumAtrIX