diff --git a/plugins/jobs/sign.py b/plugins/jobs/sign.py index ee6579f23..98ebd4830 100644 --- a/plugins/jobs/sign.py +++ b/plugins/jobs/sign.py @@ -72,12 +72,13 @@ async def sign(self, context: CallbackContext): text = "签到失败了呜呜呜 ~ 服务器连接超时 服务器熟啦 ~ " sign_db.status = SignStatusEnum.TIMEOUT_ERROR except ClientConnectorError as exc: - logger.warning(f"aiohttp 请求错误 {repr(exc)}") + logger.warning("aiohttp 请求错误 %s", str(exc)) text = "签到失败了呜呜呜 ~ 链接服务器发生错误 服务器熟啦 ~ " sign_db.status = SignStatusEnum.TIMEOUT_ERROR except NeedChallenge: - text = "签到失败,触发验证码风控,自动签到自动关闭" - sign_db.status = SignStatusEnum.NEED_CHALLENGE + text = "签到失败,触发验证码风控" + if context.job.name == "SignAgainJob": + sign_db.status = SignStatusEnum.NEED_CHALLENGE except Exception as exc: logger.error(f"执行自动签到时发生错误 用户UID[{user_id}]") logger.exception(exc) @@ -87,12 +88,10 @@ async def sign(self, context: CallbackContext): try: await context.bot.send_message(sign_db.chat_id, text, parse_mode=ParseMode.HTML) except BadRequest as exc: - logger.error(f"执行自动签到时发生错误 用户UID[{user_id}]") - logger.exception(exc) + logger.error("执行自动签到时发生错误 message[%s] user_id[%s]", exc.message, user_id) sign_db.status = SignStatusEnum.BAD_REQUEST except Forbidden as exc: - logger.error(f"执行自动签到时发生错误 用户UID[{user_id}]") - logger.exception(exc) + logger.error("执行自动签到时发生错误 message[%s] user_id[%s]", exc.message, user_id) sign_db.status = SignStatusEnum.FORBIDDEN except Exception as exc: logger.error(f"执行自动签到时发生错误 用户UID[{user_id}]")