积分消费提醒
This commit is contained in:
@@ -158,11 +158,17 @@ def plugin_points_cost(points: int, description: str = None, feature: Feature =
|
|||||||
)
|
)
|
||||||
|
|
||||||
if deduct_success:
|
if deduct_success:
|
||||||
logger.info(f"用户 {sender} 使用功能扣除 {points} 积分")
|
logger.info(f"用户 {sender} 使用 {plugin_name} 功能扣除 {points} 积分")
|
||||||
|
|
||||||
# 如果响应中没有提到积分,添加积分信息
|
# 如果响应中没有提到积分,添加积分信息
|
||||||
if "积分" not in response:
|
if "积分" not in response:
|
||||||
response += f"\n\n💰 已消费 {points} 积分"
|
response += f"\n\n💰 已消费 {points} 积分"
|
||||||
|
wcf = message.get("wcf")
|
||||||
|
if wcf:
|
||||||
|
wcf.send_text(
|
||||||
|
f"💰消费 {points} 积分",
|
||||||
|
(roomid if roomid else sender), sender
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
logger.warning(f"用户 {sender} 积分扣除失败: {deduct_result}")
|
logger.warning(f"用户 {sender} 积分扣除失败: {deduct_result}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user