调整积分排行内容
This commit is contained in:
@@ -410,6 +410,7 @@ class PointsDBOperator(BaseDBOperator):
|
||||
SELECT user_id, total_points, checkin_points, game_points, other_points
|
||||
FROM t_user_points
|
||||
WHERE group_id = %s
|
||||
AND user_id !='SYSTEM'
|
||||
ORDER BY total_points DESC
|
||||
LIMIT %s
|
||||
""", (group_id, limit))
|
||||
|
||||
@@ -325,7 +325,7 @@ class PointTradePlugin(MessagePluginInterface):
|
||||
output = (
|
||||
f"💰 {user_name} 的积分\n"
|
||||
f"━━━━━━━━━━━━━━\n"
|
||||
f"💵 当前积分: {user_points.get('total_points', 0)}\n"
|
||||
f"💵 当前积分: {user_points.get('total_points', 0)}"
|
||||
# f"📊 积分来源: {source_text}"
|
||||
f"{recent_txs}"
|
||||
)
|
||||
@@ -372,12 +372,11 @@ class PointTradePlugin(MessagePluginInterface):
|
||||
points = user.get('total_points', 0)
|
||||
|
||||
# 获取用户昵称
|
||||
user_info = self._get_user_record(user_id, roomid)
|
||||
user_name = user_info.get('wx_nick_name', user_id) if user_info else user_id
|
||||
user_info = self.bot.get_chatroom_nickname(user_id, roomid)
|
||||
|
||||
# 添加排名标记
|
||||
rank_mark = "🥇" if i == 1 else "🥈" if i == 2 else "🥉" if i == 3 else f"{i}."
|
||||
rank_list.append(f"{rank_mark} {user_name}: {points} 积分")
|
||||
rank_list.append(f"{rank_mark} {user_info}: {points} 积分")
|
||||
|
||||
output = (
|
||||
f"🏆 积分排行榜 🏆\n"
|
||||
|
||||
Reference in New Issue
Block a user