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)