From ca056d038141df299d518ecbdebe9dbabee0f523 Mon Sep 17 00:00:00 2001 From: liuwei Date: Wed, 9 Apr 2025 17:15:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=91=E7=9A=84=E7=A7=AF=E5=88=86+=E7=A7=AF?= =?UTF-8?q?=E5=88=86=E6=8E=92=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/decorator/points_decorator.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/decorator/points_decorator.py b/utils/decorator/points_decorator.py index e1f68e8..fa03321 100644 --- a/utils/decorator/points_decorator.py +++ b/utils/decorator/points_decorator.py @@ -93,6 +93,7 @@ def points_reward_decorator(points_calculator: Union[int, Callable], source_type return success, response return wrapper + return decorator @@ -138,7 +139,7 @@ def plugin_points_cost(points: int, description: str = None, feature: Feature = wcf = message.get("wcf") if wcf: wcf.send_text( - f"❌ 积分不足,无法使用 {plugin_name} 功能\n" + f"❌ 积分不足\n无法使用 {plugin_name} 功能\n先参与积分活动[签到,答题/t]赚取吧!\n" f"有: {user_points['total_points']} | 需: {points} |差: {points - user_points['total_points']} ", (roomid if roomid else sender), sender ) @@ -165,7 +166,7 @@ def plugin_points_cost(points: int, description: str = None, feature: Feature = if wcf: wcf.send_text( f"💰消费 {points} 积分", - (roomid if roomid else sender), sender + (roomid if roomid else sender), sender ) else: logger.warning(f"用户 {sender} 积分扣除失败: {deduct_result}") @@ -178,4 +179,5 @@ def plugin_points_cost(points: int, description: str = None, feature: Feature = return func(self, message) return wrapper + return decorator