I'm working on an IRC bot and I'm trying to make a anti-swear plugin easier.
It's currently working like this:
if text.find('swearword') != -1:
message('Please do not use that word')
But I want to make it so instead of having to make a new if for each swear word, I figured it would be easier if it was like this: if text.find(isinarray)
. So if it's in the array (where I will put all the swear words) it will display a message.