Excluded apostrophes in regular expression so contractions are okay, and also added more bad words

This commit is contained in:
Sean Wang
2019-03-31 23:02:13 -04:00
parent 4226f6338d
commit 6b6b709b76
2 changed files with 2 additions and 2 deletions

View File

@@ -1 +1 @@
{"fuck": "frick", "f\u00fcck": "frick", "fucker": "falcon", "fucking": "falconing", "dick": "duck", "bitching": "blipping", "lmao": "lmbo", "motherfucker": "motherfricker", "shit": "poop", "bitch": "blip", "hell": "heck", "ass": "butt", "asshole": "butthole", "bastard": "custard", "damn": "dang", "dammit": "dangit", "damnit": "dangit", "cunt": "punt", "biatch": "bleach", "smd": "smp", "bitches": "beaches", "tit": "bit", "tits": "bits", "lmfao": "lmfba", "whore": "princess", "slut": "butt", "shitter": "digger", "penis": "thing", "penises": "things"}
{"fuck": "frick", "f\u00fcck": "frick", "fucker": "falcon", "fucking": "falconing", "dick": "duck", "bitching": "blipping", "lmao": "lmbo", "motherfucker": "motherfricker", "shit": "poop", "bitch": "blip", "hell": "heck", "ass": "butt", "asshole": "butthole", "bastard": "custard", "damn": "dang", "dammit": "dangit", "damnit": "dangit", "cunt": "punt", "biatch": "bleach", "smd": "smp", "bitches": "beaches", "tit": "bit", "tits": "bits", "lmfao": "lmfba", "whore": "princess", "slut": "butt", "shitter": "digger", "penis": "thing", "penises": "things", "fucked": "screwed", "dammit" : "dangit", "goddammit": "dangnabbit", "shitty": "poopy", "bitchy": "blippy", "fucky": "screwy", "assy": "butty"}

View File

@@ -130,7 +130,7 @@ async def on_message(message):
]
message_string = message.content
# regex pattern for stripping out non-alphanumeric and non-spaces
pattern = re.compile(r"([^\s\w]|_)+")
pattern = re.compile(r"([^\s\w^']|_)+")
# Initialize bad word count
bad_word_count = 0
# Take out everything except alpha-numeric and spaces