Typos and cosmetics.
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
msg = self.MESSAGE["text"].lower()
|
||||
|
||||
responce_given = False
|
||||
response_given = False
|
||||
|
||||
for file in os.listdir(self.path + "db/"):
|
||||
if responce_given:
|
||||
if response_given:
|
||||
break
|
||||
|
||||
try:
|
||||
criteria = json.loads( readfile(self.path + "db/" + file) )
|
||||
criteria = json.loads(readfile(self.path + "db/" + file))
|
||||
|
||||
for wordset in criteria["trigger_lists"]:
|
||||
for word_set in criteria["trigger_lists"]:
|
||||
all_words_in = True
|
||||
for word in wordset:
|
||||
for word in word_set:
|
||||
if word not in msg:
|
||||
all_words_in = False
|
||||
break
|
||||
|
||||
if all_words_in:
|
||||
self.RESPONSE = criteria["responce_text"]
|
||||
responce_given = True
|
||||
self.RESPONSE = criteria["response_text"]
|
||||
response_given = True
|
||||
break
|
||||
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user