Added Slur Check to Utilities
This commit is contained in:
parent
dee1bf4be0
commit
2c05d978de
@ -20,6 +20,21 @@ def contains_url(self, input: str):
|
|||||||
def get_args(text: str) -> list:
|
def get_args(text: str) -> list:
|
||||||
return text.split(" ")
|
return text.split(" ")
|
||||||
|
|
||||||
|
def contains_slur(self, input: str):
|
||||||
|
containsSlur: bool = False
|
||||||
|
parsedMessage = input.split(" ")
|
||||||
|
for word in parsedMessage:
|
||||||
|
for slur in config.slurList:
|
||||||
|
if word.lower() == slur:
|
||||||
|
containsSlur = True
|
||||||
|
break
|
||||||
|
if containsSlur:
|
||||||
|
break
|
||||||
|
|
||||||
|
if containsSlur:
|
||||||
|
print("<{ slur detected! }> ")
|
||||||
|
return containsSlur
|
||||||
|
|
||||||
def hard_shutdown():
|
def hard_shutdown():
|
||||||
current_system_pid = os.getpid()
|
current_system_pid = os.getpid()
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user