If nobody scored in this round of wordbot, then silently extend the
round (if configured to do so; default yes).
Also add some type annotations and an index to ensure_db
This groups multiple words into the same message and also adds a little
bit of fun for multi-word scores.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
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 <alekratz@gmail.com>
If there was an unmatched word 'foo', and someone wrote 'foo. bar.', wordbot would not recognize the match because it was only splitting the string on spaces, not punctuation.
This treats as a word any contiguous sequence of letters, numbers (just in case) and hyphens (just in case).
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
When a user's name is used in the !wordbot leaderboard command, we make
every effort to not ping them by interleaving zero-width space
characters in the nickname.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This matches the old database format that was written a while back.
There's an "end_now" command that's been left in there for debugging
purposes, that'll be gone soon enough.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>