Add minor changes

This commit is contained in:
AlberLC
2023-05-09 05:32:59 +02:00
parent a9a79b2705
commit d9eb01e5c0

View File

@@ -377,20 +377,20 @@ class ScraperBot(MultiBot, ABC):
if message.chat.is_group: if message.chat.is_group:
sended_info_message = await self.send(f"{message.author.name.split('#')[0]} compartió{self._medias_sended_info(medias)}", message, reply_to=message.replied_message) sended_info_message = await self.send(f"{message.author.name.split('#')[0]} compartió{self._medias_sended_info(medias)}", message, reply_to=message.replied_message)
if ( if (
send_user_context send_user_context
and and
(user_text := ' '.join( (user_text := ' '.join(
[word for word in message.text.split() [word for word in message.text.split()
if ( if (
not any(await self._find_ids(word)) not any(await self._find_ids(word))
and and
not flanautils.find_urls(word) not flanautils.find_urls(word)
and and
not flanautils.cartesian_product_string_matching(word, keywords, multibot_constants.PARSER_MIN_SCORE_DEFAULT) not flanautils.cartesian_product_string_matching(word, keywords, multibot_constants.PARSER_MIN_SCORE_DEFAULT)
and and
flanautils.remove_symbols(word).lower() not in (str(self.id), self.name.lower()) flanautils.remove_symbols(word).lower() not in (str(self.id), self.name.lower())
)] )]
)) ))
): ):
user_text_bot_message = await self.send(user_text, message, reply_to=message.replied_message) user_text_bot_message = await self.send(user_text, message, reply_to=message.replied_message)