修复:参赛奖励改为结算时发放
报名时不再立即发放积分,改为比赛结算时统一发放参与奖励, 防止通过反复报名/取消刷积分 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -211,9 +211,6 @@ async def handle_register(bot: Bot, event: Event):
|
|||||||
# Create horse
|
# Create horse
|
||||||
room.horses[horse_name] = Horse(owner_id=user_id, name=horse_name)
|
room.horses[horse_name] = Horse(owner_id=user_id, name=horse_name)
|
||||||
|
|
||||||
# Reward participant (outside lock to avoid holding lock during API call)
|
|
||||||
await points_service.reward_participant(user_id)
|
|
||||||
|
|
||||||
count = len(room.horses)
|
count = len(room.horses)
|
||||||
await register_cmd.finish(f"报名成功!马匹 \"{horse_name}\" 已加入比赛({count}/8)")
|
await register_cmd.finish(f"报名成功!马匹 \"{horse_name}\" 已加入比赛({count}/8)")
|
||||||
|
|
||||||
@@ -404,7 +401,7 @@ help_cmd = on_command("赛马帮助", priority=5)
|
|||||||
async def handle_help(bot: Bot, event: Event):
|
async def handle_help(bot: Bot, event: Event):
|
||||||
"""Handle help command."""
|
"""Handle help command."""
|
||||||
help_text = """赛马命令帮助:
|
help_text = """赛马命令帮助:
|
||||||
/赛马报名 <马匹名> - 报名参赛(获得50积分奖励)
|
/赛马报名 <马匹名> - 报名参赛
|
||||||
/赛马取消报名 - 取消报名并退还下注
|
/赛马取消报名 - 取消报名并退还下注
|
||||||
/赛马下注 <马匹名> <金额> - 下注(不能给自己的马下注)
|
/赛马下注 <马匹名> <金额> - 下注(不能给自己的马下注)
|
||||||
/赛马赔率 - 查看当前赔率
|
/赛马赔率 - 查看当前赔率
|
||||||
|
|||||||
Reference in New Issue
Block a user