LORDCHANNEL2.0/utils/profanity_filter.py

12 lines
400 B
Python
Raw Permalink Normal View History

2021-03-13 18:36:50 +00:00
import os
def profanity_words():
profanity_list = []
__location__ = os.path.realpath(
os.path.join(os.getcwd(), os.path.dirname(__file__)))
file = __location__ + '/profanity-words.txt'
with open(file,"r") as profanity:
for riga in profanity:
riga = riga.replace("\r", "").replace("\n", "")
profanity_list.append(riga)
return profanity_list