From 0342e220f659d4ba9aaac08f282114302ecc98d9 Mon Sep 17 00:00:00 2001 From: CMHopeSunshine <277073121@qq.com> Date: Sun, 18 Sep 2022 18:47:15 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E4=BC=98=E5=8C=96`=E6=9D=90?= =?UTF-8?q?=E6=96=99=E5=9B=BE=E9=89=B4`=E6=96=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LittlePaimon/plugins/Paimon_Wiki/__init__.py | 2 +- LittlePaimon/plugins/Paimon_Wiki/{handler.py => draw_map.py} | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename LittlePaimon/plugins/Paimon_Wiki/{handler.py => draw_map.py} (98%) diff --git a/LittlePaimon/plugins/Paimon_Wiki/__init__.py b/LittlePaimon/plugins/Paimon_Wiki/__init__.py index b741975..5dd62d1 100644 --- a/LittlePaimon/plugins/Paimon_Wiki/__init__.py +++ b/LittlePaimon/plugins/Paimon_Wiki/__init__.py @@ -13,7 +13,7 @@ from LittlePaimon.utils.alias import get_match_alias from LittlePaimon.utils.message import MessageBuild from LittlePaimon.database.models import PlayerAlias from LittlePaimon.config import RESOURCE_BASE_PATH -from .handler import init_map, draw_map +from .draw_map import init_map, draw_map # from .abyss_rate_draw import draw_rate_rank, draw_teams_rate diff --git a/LittlePaimon/plugins/Paimon_Wiki/handler.py b/LittlePaimon/plugins/Paimon_Wiki/draw_map.py similarity index 98% rename from LittlePaimon/plugins/Paimon_Wiki/handler.py rename to LittlePaimon/plugins/Paimon_Wiki/draw_map.py index 40f5539..853da86 100644 --- a/LittlePaimon/plugins/Paimon_Wiki/handler.py +++ b/LittlePaimon/plugins/Paimon_Wiki/draw_map.py @@ -95,14 +95,14 @@ async def draw_map(name: str, map_: str): await total_img.paste(map_img, (48, total_img.height - 60 - map_img.height)) icon = await aiorequests.get_img(resource.icon, size=(300, 300)) await total_img.paste(icon, (100, 100)) - await total_img.text(f'「{name}」', 457, 147, fm.get('SourceHanSerifCN-Bold.otf', 72), 'white') + await total_img.text(f'「{name}」', 454, 145, fm.get('SourceHanSerifCN-Bold.otf', 72), 'white') info = await aiorequests.get(f'https://info.minigg.cn/materials?query={name}') info = info.json() des = '' if 'description' in info: des += info['description'].strip('\n') if 'source' in info: - des += '\n推荐采集地点:' + ','.join(info['source']) + des += '\n推荐采集地点:' + ','.join(info['source']).replace('推荐:', '') if des: await total_img.text_box(des.replace('\n', '^'), (482, 1010), (281, 520), fm.get('SourceHanSansCN-Bold.otf', 30), '#3c3c3c') await total_img.text('CREATED BY LITTLEPAIMON', (0, total_img.width), total_img.height - 45, fm.get('bahnschrift_bold', 36, 'Bold'), '#3c3c3c', align='center')