mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2024-10-21 16:27:15 +08:00
🐛 修复深渊统计
This commit is contained in:
parent
8a0f9faadf
commit
261fa285f3
@ -1,6 +1,8 @@
|
|||||||
import datetime
|
import datetime
|
||||||
from typing import Dict, Any, Tuple
|
from typing import Dict, Any, Tuple
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
|
||||||
|
import pytz
|
||||||
from nonebot import get_bot
|
from nonebot import get_bot
|
||||||
from LittlePaimon.database.models import AbyssInfo
|
from LittlePaimon.database.models import AbyssInfo
|
||||||
from LittlePaimon.utils import aiorequests
|
from LittlePaimon.utils import aiorequests
|
||||||
@ -32,7 +34,7 @@ async def get_statistics(group_id: int):
|
|||||||
member_id_list = [str(member['user_id']) for member in member_list]
|
member_id_list = [str(member['user_id']) for member in member_list]
|
||||||
info_list = [info for info in info_list if
|
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]
|
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()
|
now = datetime.datetime.now().replace(tzinfo=pytz.timezone('Asia/Shanghai'))
|
||||||
info_list = [info for info in info_list if info.start_time <= now <= info.end_time]
|
info_list = [info for info in info_list if info.start_time <= now <= info.end_time]
|
||||||
if not info_list:
|
if not info_list:
|
||||||
return '本群还没有深渊战斗数据哦!'
|
return '本群还没有深渊战斗数据哦!'
|
||||||
|
Loading…
Reference in New Issue
Block a user