Skip to content

Commit

Permalink
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion multibot/bots/telegram_bot.py
Original file line number Diff line number Diff line change
@@ -328,7 +328,7 @@ async def send(
return

if send_as_file is None:
word_matches = flanautils.cartesian_product_string_matching(message.text, constants.KEYWORDS['send_as_file'], min_ratio=0.65)
word_matches = flanautils.cartesian_product_string_matching(message.text, constants.KEYWORDS['send_as_file'], min_ratio=constants.TELEGRAM_SEND_AS_FILE_RATIO_MIN_RATIO)
send_as_file_ratio = sum(max(matches.values()) for text_word, matches in word_matches.items())
send_as_file = bool(send_as_file_ratio)

1 change: 1 addition & 0 deletions multibot/constants.py
Original file line number Diff line number Diff line change
@@ -36,6 +36,7 @@
RAISE_AMBIGUITY_ERROR = False
RATIO_REWARD_EXPONENT = 2
TELEGRAM_DELETE_MESSAGE_LIMIT = 100
TELEGRAM_SEND_AS_FILE_RATIO_MIN_RATIO = 0.85

SAD_EMOJIS = '😥😪😓😔😕☹🙁😞😢😭😩😰'

0 comments on commit 7663bea

Please sign in to comment.