Skip to content

Commit

Permalink
fix: linter
Browse files Browse the repository at this point in the history
  • Loading branch information
ovchynnikov committed Jan 30, 2025
1 parent 92de781 commit e337652
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,7 @@ async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE): #

# Handle Instagram stories
if "instagram.com/stories/" in message_text:
instagram_stories_responses = {
"ua": "Сторіз не можу скачати.",
"en": "Instagram stories not supported."
}
instagram_stories_responses = {"ua": "Сторіз не можу скачати.", "en": "Instagram stories not supported."}
await update.message.reply_text(instagram_stories_responses[language])
return

Expand All @@ -174,7 +171,7 @@ async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE): #
if update.effective_chat.type == "private":
not_supported_responses = {
"ua": "Цей сайт не підтримується. Спробуйте додати ** перед https://",
"en": "This site is not supported. Try adding ** before the https://"
"en": "This site is not supported. Try adding ** before the https://",
}
await update.message.reply_text(not_supported_responses[language])
return # Stop further execution after sending the reply
Expand Down Expand Up @@ -249,9 +246,7 @@ async def send_video(update: Update, video_path: str, has_spoiler: bool) -> None
except TimedOut as e:
error("Telegram timeout while sending video. %s", e)
except (NetworkError, TelegramError) as e:
await update.message.reply_text(
f"Error sending video: {str(e)}. Please try again later."
)
await update.message.reply_text(f"Error sending video: {str(e)}. Please try again later.")


def main():
Expand Down

0 comments on commit e337652

Please sign in to comment.