From be794c1bf0e7e245e694afc238e3229955911c5e Mon Sep 17 00:00:00 2001 From: baiqwerdvd <158065462+baiqwerdvd@users.noreply.github.com> Date: Sun, 26 May 2024 22:05:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=98=E8=AE=B0=E5=8A=A0=E5=8F=91=E9=80=81?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ArknightsUID/arknightsuid_charsnapshot/__init__.py | 3 ++- ArknightsUID/arknightsuid_charsnapshot/get_char_snapshot.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ArknightsUID/arknightsuid_charsnapshot/__init__.py b/ArknightsUID/arknightsuid_charsnapshot/__init__.py index 6dce6d3..45a56b7 100644 --- a/ArknightsUID/arknightsuid_charsnapshot/__init__.py +++ b/ArknightsUID/arknightsuid_charsnapshot/__init__.py @@ -17,4 +17,5 @@ async def send_char_snapshot(bot: Bot, ev: Event): return "你还没有绑定UID噢,请使用[ark绑定uid123]完成绑定!" await bot.logger.info("开始执行[ark角色快照]") - await get_char_snapshot(uid) + im = await get_char_snapshot(uid) + await bot.send(im) diff --git a/ArknightsUID/arknightsuid_charsnapshot/get_char_snapshot.py b/ArknightsUID/arknightsuid_charsnapshot/get_char_snapshot.py index 78ec003..b37ecfd 100644 --- a/ArknightsUID/arknightsuid_charsnapshot/get_char_snapshot.py +++ b/ArknightsUID/arknightsuid_charsnapshot/get_char_snapshot.py @@ -6,7 +6,7 @@ from ..utils.models.skland.models import ( PlayerEquipmentInfo, PlayerInfoChar, ) - +from gsuid_core.utils.image.convert import convert_img from ..arknightsuid_resource.constants import SKILL_TABLE from ..utils.fonts.source_han_sans import ( sans_font_26, @@ -233,6 +233,8 @@ async def get_char_snapshot(uid: str): footer_img = Image.open(TEXT_PATH / "footer.png") bg_img.paste(footer_img, (0, 2365), mask=footer_img) + res = await convert_img(bg_img) + return res def draw_char(