解决bug

This commit is contained in:
liuwei
2025-04-10 11:27:11 +08:00
parent 69c99cf1f5
commit 22e96f4589

View File

@@ -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: