From 8ce5f8a55da6fe06582301586a746f03c57ac3b3 Mon Sep 17 00:00:00 2001 From: liuwei Date: Wed, 9 Apr 2025 16:38:04 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=AF=E5=88=86=E6=B6=88=E8=B4=B9=E6=8F=90?= =?UTF-8?q?=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/decorator/points_decorator.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/utils/decorator/points_decorator.py b/utils/decorator/points_decorator.py index 3ca30e1..9cae927 100644 --- a/utils/decorator/points_decorator.py +++ b/utils/decorator/points_decorator.py @@ -158,11 +158,17 @@ def plugin_points_cost(points: int, description: str = None, feature: Feature = ) if deduct_success: - logger.info(f"用户 {sender} 使用功能扣除 {points} 积分") + logger.info(f"用户 {sender} 使用 {plugin_name} 功能扣除 {points} 积分") # 如果响应中没有提到积分,添加积分信息 if "积分" not in response: response += f"\n\n💰 已消费 {points} 积分" + wcf = message.get("wcf") + if wcf: + wcf.send_text( + f"💰消费 {points} 积分", + (roomid if roomid else sender), sender + ) else: logger.warning(f"用户 {sender} 积分扣除失败: {deduct_result}")