forked from MarseyWorld/MarseyWorld
reduce slur filter down to necessary ones and partially implement what fish wants (closes #432)
signed off by snekfriendmaster
parent
e672330614
commit
ffd9c73566
|
@ -140,7 +140,8 @@ if SITE_NAME == 'rDrama':
|
|||
|
||||
PROFANITIES = {
|
||||
'motherfucker': 'motherlover',
|
||||
'fuck': 'frick',
|
||||
'fuck': ['frick', 'fudge', 'freak'],
|
||||
' ass ': [' butt ', ' backside ', ' bum '],
|
||||
'shitting': 'pooping',
|
||||
'lmao': 'lmbo',
|
||||
'damn': 'darn',
|
||||
|
|
|
@ -123,6 +123,8 @@ def sub_matcher(match:re.Match, upper=False, replace_with:Union[dict[str, str],
|
|||
return match_str
|
||||
else:
|
||||
repl = replace_with[match_str.lower()]
|
||||
if not isinstance(repl, str):
|
||||
repl = random.choice(repl)
|
||||
return repl if not upper or "<img" in repl else repl.upper()
|
||||
|
||||
def sub_matcher_upper(match, replace_with:Union[dict[str, str], dict[str, List[str]]]=SLURS):
|
||||
|
|
Loading…
Reference in New Issue