Update FlanaBot._on_database_messages

This commit is contained in:
AlberLC
2024-03-07 22:39:31 +01:00
parent 7a0e6ba4d8
commit d0bc075e59

View File

@@ -269,12 +269,15 @@ class FlanaBot(Connect4Bot, PenaltyBot, PollBot, ScraperBot, UberEatsBot, Weathe
is_group = True
elif flanautils.cartesian_product_string_matching(
multibot_constants.KEYWORDS['private'],
word,
lower_word,
multibot_constants.PARSER_MIN_SCORE_DEFAULT
):
is_private = True
elif (number := flanautils.cast_number(word, raise_exception=False)) != word:
n_messages += number
else:
try:
n_messages += flanautils.cast_number(word)
except ValueError:
pass
if not is_group and not is_private:
is_group = True