积分打劫功能

This commit is contained in:
liuwei
2025-04-09 17:50:37 +08:00
parent d1bab5d585
commit fe1ef05ede

View File

@@ -545,12 +545,15 @@ class PointTradePlugin(MessagePluginInterface):
)
if success:
# 获取转账后的积分信息
from_user = result.get("from_user", {})
to_user = result.get("to_user", {})
# 构建打劫失败消息
output = (
f"🚨 打劫失败!\n"
f"👤{robber_name} 试图打劫 👤{target_name} 但被当场抓获,并赔款!\n"
f"👮‍♂️ 被罚款 {penalty_amount} 积分!\n"
f"👤{robber_name} 当前积分: {result.get('total_points', 0)}"
f"👤{robber_name} 当前积分: {to_user.get('total_points', 0)}"
)
wcf.send_text(output, roomid, sender)