|
|
@ -64,7 +64,7 @@ class Callbacks(object): |
|
|
|
# parse keywords |
|
|
|
self.bot.extra_info = {"persona": [], "scenario": [], "example_dialogue": []} |
|
|
|
for i, keyword in enumerate(self.bot.keywords): |
|
|
|
if re.search(keyword["regex"], event.body): |
|
|
|
if re.search(keyword["regex"], event.body, flags=re.IGNORECASE): |
|
|
|
self.bot.keywords[i]['active'] = int(keyword["duration"]) |
|
|
|
logger.info(f"keyword \"{keyword['regex']}\" detected") |
|
|
|
if 'active' in self.bot.keywords[i]: |
|
|
|