From ee7538e32b1b66eccfb8119e532e09817f1e0f4f 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, 7 Oct 2022 20:23:25 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20=E4=BF=AE=E6=94=B9=E6=97=A5?= =?UTF-8?q?=E8=AE=B0=E5=92=8C=E5=B1=80=E9=83=A8=E5=8F=98=E9=87=8F=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/baseplugin.py | 10 +++++----- plugins/genshin/cookies.py | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/baseplugin.py b/core/baseplugin.py index 223fd730..73b853ff 100644 --- a/core/baseplugin.py +++ b/core/baseplugin.py @@ -14,18 +14,18 @@ async def clean_message(context: CallbackContext): await context.bot.delete_message(chat_id=job.chat_id, message_id=job.data) except BadRequest as exc: if "not found" in str(exc): - logger.warning(f"Auth模块删除消息 chat_id[{job.chat_id}] message_id[{job.data}]失败 消息不存在") + logger.warning(f"删除消息 chat_id[{job.chat_id}] message_id[{job.data}]失败 消息不存在") elif "Message can't be deleted" in str(exc): logger.warning( - f"Auth模块删除消息 chat_id[{job.chat_id}] message_id[{job.data}]失败 消息无法删除 可能是没有授权") + f"删除消息 chat_id[{job.chat_id}] message_id[{job.data}]失败 消息无法删除 可能是没有授权") else: - logger.error(f"Auth模块删除消息 chat_id[{job.chat_id}] message_id[{job.data}]失败") + logger.error(f"删除消息 chat_id[{job.chat_id}] message_id[{job.data}]失败") logger.exception(exc) except Forbidden as exc: if "bot was kicked" in str(exc): - logger.warning(f"Auth模块删除消息 chat_id[{job.chat_id}] message_id[{job.data}]失败 已经被踢出群") + logger.warning(f"删除消息 chat_id[{job.chat_id}] message_id[{job.data}]失败 已经被踢出群") else: - logger.error(f"Auth模块删除消息 chat_id[{job.chat_id}] message_id[{job.data}]失败") + logger.error(f"删除消息 chat_id[{job.chat_id}] message_id[{job.data}]失败") logger.exception(exc) diff --git a/plugins/genshin/cookies.py b/plugins/genshin/cookies.py index 97fc624c..05e46a79 100644 --- a/plugins/genshin/cookies.py +++ b/plugins/genshin/cookies.py @@ -248,8 +248,8 @@ class SetUserCookies(Plugin.Conversation, BasePlugin.Conversation): except InvalidCookies: await message.reply_text("Cookies已经过期,请检查是否正确", reply_markup=ReplyKeyboardRemove()) return ConversationHandler.END - except GenshinException as error: - await message.reply_text(f"获取账号信息发生错误,错误信息为 {str(error)},请检查Cookie或者账号是否正常", + except GenshinException as exc: + await message.reply_text(f"获取账号信息发生错误,错误信息为 {str(exc)},请检查Cookie或者账号是否正常", reply_markup=ReplyKeyboardRemove()) return ConversationHandler.END except (AttributeError, ValueError):