Skip to content

Commit

Permalink
fix AttributeError
Browse files Browse the repository at this point in the history
  • Loading branch information
krau committed Dec 17, 2023
1 parent eeb87c2 commit 3fa2082
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kmua/callbacks/quote.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,10 @@ async def delete_quote_in_chat(update: Update, context: ContextTypes.DEFAULT_TYP
await _chat_quote_manage(update, context)
return
quote_message = message.reply_to_message
if not quote_message:
sent_message = await message.reply_text("请回复要从语录中删除的消息")
logger.info(f"Bot: {sent_message.text}")
return
quote_user = quote_message.sender_chat or quote_message.from_user

user = message.sender_chat if message.sender_chat else user
Expand Down

0 comments on commit 3fa2082

Please sign in to comment.