|
@@ -8,6 +8,6 @@ def _wordFilter(msg: Message, regexs: List[str]) -> bool:
|
8
|
8
|
re.search(rgx, msg.content) for rgx in regexs
|
9
|
9
|
)
|
10
|
10
|
|
11
|
|
-def findWords(messages: List[Message], words: List[Message]) -> List[Message]:
|
|
11
|
+def findWords(messages: List[Message], words: List[str]) -> List[Message]:
|
12
|
12
|
r_words = [r"\b"+word+r"\b" for word in words]
|
13
|
13
|
return filter(lambda m: _wordFilter(m, r_words), messages)
|