From c2eaaf270da7a0b48cac85405816ce0f0fcfac98 Mon Sep 17 00:00:00 2001 From: Vasily Zubarev Date: Wed, 13 Nov 2024 11:43:36 +0100 Subject: [PATCH] fix: bot replies to pictures --- bot/handlers/comments.py | 5 +---- bot/handlers/upvotes.py | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/bot/handlers/comments.py b/bot/handlers/comments.py index 58eea7faa..bec551236 100644 --- a/bot/handlers/comments.py +++ b/bot/handlers/comments.py @@ -19,10 +19,7 @@ def comment(update: Update, context: CallbackContext) -> None: - if not update.message \ - or not update.message.reply_to_message \ - or not update.message.reply_to_message.text \ - or not update.message.reply_to_message.caption: + if not update.message or not update.message.reply_to_message: return None reply_text_start = (update.message.reply_to_message.text or update.message.reply_to_message.caption)[:10] diff --git a/bot/handlers/upvotes.py b/bot/handlers/upvotes.py index 69a475685..5879c79b2 100644 --- a/bot/handlers/upvotes.py +++ b/bot/handlers/upvotes.py @@ -14,10 +14,7 @@ @is_club_member def upvote(update: Update, context: CallbackContext) -> None: - if not update.message \ - or not update.message.reply_to_message \ - or not update.message.reply_to_message.text \ - or not update.message.reply_to_message.caption: + if not update.message or not update.message.reply_to_message: return None user = get_club_user(update)