mirror of
https://github.com/PaiGramTeam/MibooGram.git
synced 2024-11-16 04:45:27 +00:00
🎨 修改日记和局部变量名称
This commit is contained in:
parent
12f80bde9e
commit
ee7538e32b
@ -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)
|
||||||
|
|
||||||
|
|
||||||
|
@ -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):
|
||||||
|
Loading…
Reference in New Issue
Block a user