mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2024-10-21 16:27:15 +08:00
✨ 增加深渊统计
指令
This commit is contained in:
parent
eb2e7a4d3f
commit
bfec19fb08
@ -11,7 +11,7 @@ async def get_statistics(group_id: int):
|
|||||||
return '本群还没有深渊战斗数据哦!'
|
return '本群还没有深渊战斗数据哦!'
|
||||||
member_list = await get_bot().get_group_member_list(group_id=group_id)
|
member_list = await get_bot().get_group_member_list(group_id=group_id)
|
||||||
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.user_id in member_id_list and info.total_battle]
|
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()
|
now = datetime.datetime.now()
|
||||||
if 1 <= now.day < 15:
|
if 1 <= now.day < 15:
|
||||||
left_day = 1
|
left_day = 1
|
||||||
@ -76,5 +76,5 @@ async def get_statistics(group_id: int):
|
|||||||
f'Created by LittlePaimon'
|
f'Created by LittlePaimon'
|
||||||
|
|
||||||
img = PMImage(size=(500, 33 * 15), color=(255, 255, 255, 255))
|
img = PMImage(size=(500, 33 * 15), color=(255, 255, 255, 255))
|
||||||
await img.text_box(text.replace('\n', '^'), (5, 495), (5, 33 * 15 - 5), fm.get('hywh', 25), 'black')
|
await img.text_box(text.replace('\n', '^'), (10, 490), (10, 33 * 15 - 10), fm.get('hywh', 25), 'black')
|
||||||
return MessageBuild.Image(img, mode='RGB')
|
return MessageBuild.Image(img, mode='RGB')
|
||||||
|
Loading…
Reference in New Issue
Block a user