From 8a0f9faadf9d49726272c2e9ce43a0b557981a21 Mon Sep 17 00:00:00 2001 From: CMHopeSunshine <277073121@qq.com> Date: Thu, 29 Sep 2022 17:40:41 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=E6=96=B0=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E5=9B=BE=E6=A0=87=E4=BB=A5=E5=8F=8A=E6=B7=B1=E6=B8=8A?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E9=94=99=E8=AF=AF=E5=9C=B0=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E4=BA=86=E9=9D=9E=E6=9C=AC=E6=9C=9F=E6=95=B0=E6=8D=AE=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LittlePaimon/plugins/Paimon_Info/abyss_statistics.py | 8 +------- LittlePaimon/utils/alias.py | 6 +++--- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/LittlePaimon/plugins/Paimon_Info/abyss_statistics.py b/LittlePaimon/plugins/Paimon_Info/abyss_statistics.py index 76e8936..cb06ea5 100644 --- a/LittlePaimon/plugins/Paimon_Info/abyss_statistics.py +++ b/LittlePaimon/plugins/Paimon_Info/abyss_statistics.py @@ -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: diff --git a/LittlePaimon/utils/alias.py b/LittlePaimon/utils/alias.py index e3918f1..3cb5c52 100644 --- a/LittlePaimon/utils/alias.py +++ b/LittlePaimon/utils/alias.py @@ -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