From 5aa282143e4330f74638ed871405bd0ef314e370 Mon Sep 17 00:00:00 2001 From: Alek Ratzloff Date: Sat, 30 Mar 2024 20:13:50 -0700 Subject: [PATCH] wordbot: Fix latest wordbot patch (whoopsie) Last patch was creating a set of the list of all matches, instead of a set of all matches. This fixes that, and also makes the regex a raw string. Signed-off-by: Alek Ratzloff --- plugins/wordbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/wordbot.py b/plugins/wordbot.py index e539047..dd76dc9 100644 --- a/plugins/wordbot.py +++ b/plugins/wordbot.py @@ -235,7 +235,7 @@ class Wordbot(Plugin): if not self.db.is_game_active(channel): # Don't try to score words for inactive games return - words_in_line = {re.findall("[a-z0-9-]+", line.lower())} + words_in_line = set(re.findall(r"[a-z0-9-]+", line.lower())) matches = words_in_line & self.db.unmatched_words(channel) for word in matches: self.send_to(