mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2024-10-21 16:27:15 +08:00
🐛 修复新角色图标以及深渊统计错误地统计了非本期数据的问题
This commit is contained in:
parent
cbfa293385
commit
8a0f9faadf
@ -33,13 +33,7 @@ async def get_statistics(group_id: int):
|
||||
info_list = [info for info in info_list if
|
||||
info.user_id in member_id_list and info.total_battle and info.total_star and info.max_damage and info.max_take_damage]
|
||||
now = datetime.datetime.now()
|
||||
if now.day <= 15:
|
||||
left_day = 1
|
||||
right_day = 15
|
||||
else:
|
||||
left_day = 16
|
||||
right_day = 31
|
||||
info_list = [info for info in info_list if left_day <= info.update_time.day <= right_day and info.update_time.month == now.month]
|
||||
info_list = [info for info in info_list if info.start_time <= now <= info.end_time]
|
||||
if not info_list:
|
||||
return '本群还没有深渊战斗数据哦!'
|
||||
elif len(info_list) < 3:
|
||||
|
@ -94,11 +94,11 @@ def get_chara_icon(name: Optional[str] = None, chara_id: Optional[int] = None,
|
||||
chara_id = get_id_by_name(name)
|
||||
if info := info_file.get(str(chara_id)):
|
||||
side_icon = info['SideIconName']
|
||||
elif chara_id == '10000070':
|
||||
elif str(chara_id) == '10000070':
|
||||
side_icon = 'UI_AvatarIcon_Side_Nilou'
|
||||
elif chara_id == '10000071':
|
||||
elif str(chara_id) == '10000071':
|
||||
side_icon = 'UI_AvatarIcon_Side_Cyno'
|
||||
elif chara_id == '10000072':
|
||||
elif str(chara_id) == '10000072':
|
||||
side_icon = 'UI_AvatarIcon_Side_Candace'
|
||||
else:
|
||||
return None
|
||||
|
Loading…
Reference in New Issue
Block a user