修复发言排行榜Bug

This commit is contained in:
机器人总动员 2021-05-06 12:06:31 +08:00
parent 1c752505b4
commit 245b621e89

View File

@ -71,7 +71,7 @@ def do_task():
# 获取发言用户数 # 获取发言用户数
user_amount = len(r.hkeys("{}_user_message_amount".format(group))) user_amount = len(r.hkeys("{}_user_message_amount".format(group)))
# 获取所有用户发言数字典 # 获取所有用户发言数字典
user_message_amount = r.hgetall("-1001403536948_user_message_amount") user_message_amount = r.hgetall("{}_user_message_amount".format(group))
user_message_amount = sorted(user_message_amount.items(), key=lambda kv: (kv[1]), reverse=True) user_message_amount = sorted(user_message_amount.items(), key=lambda kv: (kv[1]), reverse=True)
# print("排序后的用户:" + str(user_message_amount)) # print("排序后的用户:" + str(user_message_amount))
top_5_user = "" top_5_user = ""