From b60094eef0afce9cc588163686501cbdedcb9d7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B0=B4=E5=B1=85=E5=AE=A4?= Date: Fri, 17 Mar 2023 12:06:58 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Update=20exception=20notificatio?= =?UTF-8?q?ns?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/system/errorhandler.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/system/errorhandler.py b/plugins/system/errorhandler.py index 7e73a6e..441ac7d 100644 --- a/plugins/system/errorhandler.py +++ b/plugins/system/errorhandler.py @@ -83,10 +83,11 @@ class ErrorHandler(Plugin): try: if update.callback_query: await update.callback_query.answer(content, show_alert=True) - reply_text = await message.reply_text(content, reply_markup=buttons, allow_sending_without_reply=True) - if filters.ChatType.GROUPS.filter(reply_text): - self.add_delete_message_job(reply_text, context=context) - self.add_delete_message_job(message, context=context) + else: + reply_text = await message.reply_text(content, reply_markup=buttons, allow_sending_without_reply=True) + if filters.ChatType.GROUPS.filter(reply_text): + self.add_delete_message_job(reply_text, context=context) + self.add_delete_message_job(message, context=context) except TelegramError as exc: logger.error(self.SEND_MSG_ERROR_NOTICE, update.update_id, exc.message) except Exception as exc: