Menu

📰
0

Trying to auto moderate with python

Reddit r/learnpython·u/C0BAZ·about 1 month ago
#RaKtK8hZ
#python#banned#word#trying#auto#article
Reading 0:00
15s threshold

Hello there!

I've set up a python script to use while livestreaming which prints the live chat into the terminal, which I then capture with OBS. Among other reasons, I'm doing this so I can add some simple cuss/slur censoring.

I've got everything working except for one problem: it currently censors the middle of words too. For example, "assumption" would have the first three letters censored. I originally figured I could check for a banned word with a space before and after it instead, but that wouldn't censor messages that are only a banned word.

Does anyone have any ideas?

(I don't think this requires sharing any of my code but if you wanna see I'm happy to send.)

Read More