From 22e96f4589a61ebd2a3c3b499647739a3b4fe066 Mon Sep 17 00:00:00 2001 From: liuwei Date: Thu, 10 Apr 2025 11:27:11 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/decorator/points_decorator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/decorator/points_decorator.py b/utils/decorator/points_decorator.py index b877dcf..ab1ddae 100644 --- a/utils/decorator/points_decorator.py +++ b/utils/decorator/points_decorator.py @@ -160,8 +160,8 @@ def plugin_points_cost(points: int, description: str = None, feature: Feature = if deduct_success: logger.info(f"用户 {sender} 使用 {plugin_name} 功能扣除 {points} 积分") - # 如果响应中没有提到积分,添加积分信息 - if "积分" not in response: + # 添加对 response 的类型检查 + if isinstance(response, str) and "积分" not in response: response += f"\n\n💰 已消费 {points} 积分" wcf = message.get("wcf") if wcf: