修复了积分系统中指令分析的错误
This commit is contained in:
@@ -33,18 +33,14 @@ class PointsGame(BaseGame):
|
||||
_, args = CommandParser.extract_command_args(command)
|
||||
args = args.strip().lower()
|
||||
|
||||
# 每日签到
|
||||
if args in ['checkin', '签到', '打卡']:
|
||||
return self._daily_checkin(user_id)
|
||||
|
||||
# 积分排行榜
|
||||
elif args in ['leaderboard', '排行榜', '排行']:
|
||||
if args in ['leaderboard', '排行榜', '排行']:
|
||||
return self._get_leaderboard()
|
||||
|
||||
|
||||
# 默认:查看个人积分
|
||||
# 默认:每日签到
|
||||
else:
|
||||
return self._get_user_points(user_id)
|
||||
return self._daily_checkin(user_id)
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"处理积分指令错误: {e}", exc_info=True)
|
||||
@@ -65,7 +61,7 @@ class PointsGame(BaseGame):
|
||||
# 检查是否已签到
|
||||
today = datetime.now().strftime('%Y-%m-%d')
|
||||
if self.db.check_daily_checkin(user_id, today):
|
||||
return f"❌ 今日已签到,明天再来吧!\n\n📅 签到日期:{today}"
|
||||
return self._get_user_points(user_id)
|
||||
|
||||
# 执行签到
|
||||
try:
|
||||
@@ -102,7 +98,7 @@ class PointsGame(BaseGame):
|
||||
text += f"**当前积分**:{points_info['points']} 分\n\n"
|
||||
text += "---\n\n"
|
||||
text += "💡 提示:\n"
|
||||
text += "• 每日签到可获得 10 积分\n"
|
||||
text += "• 每日签到可获得 100 积分\n"
|
||||
text += "• 查看运势可获得随机积分\n"
|
||||
text += "• 使用 `.points leaderboard` 查看排行榜"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user