Skip to content

Commit

Permalink
fix: bot replies to pictures
Browse files Browse the repository at this point in the history
  • Loading branch information
vas3k committed Nov 13, 2024
1 parent 4c7f5c0 commit c2eaaf2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions bot/handlers/comments.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
5 changes: 1 addition & 4 deletions bot/handlers/upvotes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c2eaaf2

Please sign in to comment.