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: