3 Commits

Author SHA1 Message Date
AlberLC
7c43db0867 Fix warning at implicit long weather request 2022-03-31 20:06:06 +02:00
AlberLC
f6093ec01e Fix resource file resolution 2022-03-17 03:50:33 +01:00
AlberLC
99d84a5d35 Fix query place with coordinates 2022-02-21 00:58:56 +01:00

View File

@@ -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) - {'-', '.'}}
@@ -591,8 +592,8 @@ class FlanaBot(MultiBot, ABC):
place_words.insert(0, 'calle')
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)
if not show_progress_state:
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)