🎨 修改日记和局部变量名称

This commit is contained in:
洛水居室 2022-10-07 20:23:25 +08:00
parent 12f80bde9e
commit ee7538e32b
No known key found for this signature in database
GPG Key ID: C9DE87DA724B88FC
2 changed files with 7 additions and 7 deletions

View File

@ -14,18 +14,18 @@ async def clean_message(context: CallbackContext):
await context.bot.delete_message(chat_id=job.chat_id, message_id=job.data) await context.bot.delete_message(chat_id=job.chat_id, message_id=job.data)
except BadRequest as exc: except BadRequest as exc:
if "not found" in str(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): elif "Message can't be deleted" in str(exc):
logger.warning( logger.warning(
f"Auth模块删除消息 chat_id[{job.chat_id}] message_id[{job.data}]失败 消息无法删除 可能是没有授权") f"删除消息 chat_id[{job.chat_id}] message_id[{job.data}]失败 消息无法删除 可能是没有授权")
else: 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) logger.exception(exc)
except Forbidden as exc: except Forbidden as exc:
if "bot was kicked" in str(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: 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) logger.exception(exc)

View File

@ -248,8 +248,8 @@ class SetUserCookies(Plugin.Conversation, BasePlugin.Conversation):
except InvalidCookies: except InvalidCookies:
await message.reply_text("Cookies已经过期请检查是否正确", reply_markup=ReplyKeyboardRemove()) await message.reply_text("Cookies已经过期请检查是否正确", reply_markup=ReplyKeyboardRemove())
return ConversationHandler.END return ConversationHandler.END
except GenshinException as error: except GenshinException as exc:
await message.reply_text(f"获取账号信息发生错误,错误信息为 {str(error)}请检查Cookie或者账号是否正常", await message.reply_text(f"获取账号信息发生错误,错误信息为 {str(exc)}请检查Cookie或者账号是否正常",
reply_markup=ReplyKeyboardRemove()) reply_markup=ReplyKeyboardRemove())
return ConversationHandler.END return ConversationHandler.END
except (AttributeError, ValueError): except (AttributeError, ValueError):