update genshin

This commit is contained in:
hibiki
2021-06-21 09:53:33 +08:00
parent 647ead8b6d
commit 862776b011
403 changed files with 138 additions and 239 deletions
+4 -4
View File
@@ -6,15 +6,15 @@ async def init_rank(users: list, all_user_data: list, group_id: int):
all_user_id = [user.user_qq for user in users]
rst = ''
for i in range(len(all_user_id) if len(all_user_id) < 10 else 10):
max_gold = max(all_user_data)
max_user_id = all_user_id[all_user_data.index(max_gold)]
_max = max(all_user_data)
max_user_id = all_user_id[all_user_data.index(_max)]
all_user_id.remove(max_user_id)
all_user_data.remove(max_gold)
all_user_data.remove(_max)
try:
user_name = (await GroupInfoUser.select_member_info(max_user_id, group_id)).user_name
except AttributeError:
user_name = f'{max_user_id}'
rst += f'{user_name}: {max_gold}\n'
rst += f'{user_name}: {_max}\n'
return rst[:-1]