Skip to content

Commit

Permalink
fix: linter
Browse files Browse the repository at this point in the history
  • Loading branch information
ovchynnikov committed Jan 29, 2025
1 parent 7b3df13 commit 0c251d2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,17 @@ async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE): #
message_text = message_text.replace("** ", "**")

# Check if URL is from a supported site
if not any(site in message_text for site in supported_sites) and update.effective_chat.type == "private" and "http" in message_text:
if (not any(site in message_text for site in supported_sites) and
update.effective_chat.type == "private" and "http" in message_text):
if language == "ua":
await update.message.reply_text("Цей сайт не підтримується. Спробуйте додати ** перед URL")
await update.message.reply_text(
"Цей сайт не підтримується. Спробуйте додати ** перед https://"
)
else:
await update.message.reply_text("This site is not supported. Try adding ** before the URL")

await update.message.reply_text(
"This site is not supported. Try adding ** before the https://"
)
return
try:
# Remove '**' prefix and any spaces if present
Expand Down

0 comments on commit 0c251d2

Please sign in to comment.