积分消费提醒

This commit is contained in:
liuwei
2025-04-09 16:38:04 +08:00
parent 910b8f32be
commit 8ce5f8a55d

View File

@@ -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}")