Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6093ec01e | ||
|
|
99d84a5d35 | ||
|
|
02d4965efa |
@@ -568,6 +568,7 @@ class FlanaBot(MultiBot, ABC):
|
||||
user_names_with_at_sign = {user.name.lower() for user in message.chat.users}
|
||||
user_names_without_at_sign = {user.name.lower().replace('@', '') for user in message.chat.users}
|
||||
original_text_words = flanautils.remove_accents(message.text.lower())
|
||||
original_text_words = original_text_words.replace(',', ' ').replace(';', ' ').replace('-', ' -')
|
||||
original_text_words = flanautils.translate(
|
||||
original_text_words,
|
||||
{symbol: None for symbol in set(flanautils.SYMBOLS) - {'-', '.'}}
|
||||
@@ -580,7 +581,7 @@ class FlanaBot(MultiBot, ABC):
|
||||
- flanautils.cartesian_product_string_matching(original_text_words, constants.KEYWORDS['thanks'], min_ratio=0.85).keys()
|
||||
- user_names_with_at_sign
|
||||
- user_names_without_at_sign
|
||||
- flanautils.CommonWords.words
|
||||
- flanautils.CommonWords.all_words
|
||||
)
|
||||
if not place_words:
|
||||
if not message.is_inline:
|
||||
@@ -592,7 +593,7 @@ class FlanaBot(MultiBot, ABC):
|
||||
place_query = ' '.join(place_words)
|
||||
if len(place_query) >= constants.MAX_PLACE_QUERY_LENGTH:
|
||||
if not message.is_inline:
|
||||
await self.send_error(Media('resources/mucho_texto.png'), message)
|
||||
await self.send_error(Media(str(flanautils.resolve_path('resources/mucho_texto.png'))), message, send_as_file=False)
|
||||
return
|
||||
if show_progress_state:
|
||||
bot_state_message = await self.send(f'Buscando "{place_query}" en el mapa 🧐...', message)
|
||||
|
||||
Reference in New Issue
Block a user