From da7ed1a6c70ff5b04d30a45f0119128ef5e6b0e3 Mon Sep 17 00:00:00 2001 From: lovecpm <50826587+lovecpm@users.noreply.github.com> Date: Wed, 27 Jul 2022 17:06:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B2=A1=E6=9C=89=E5=A3=B6?= =?UTF-8?q?=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B=E4=BC=9A=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E9=99=A40=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Paimon_Info/draw_daily_note.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Paimon_Info/draw_daily_note.py b/Paimon_Info/draw_daily_note.py index a7aca44..626daf5 100644 --- a/Paimon_Info/draw_daily_note.py +++ b/Paimon_Info/draw_daily_note.py @@ -69,7 +69,9 @@ async def draw_daily_note_card(data, uid): # 宝钱文字 bg_draw.text((337, 701), f"{data['current_home_coin']}/{data['max_home_coin']}", fill='white', font=get_font(48, 'number.ttf')) - bg_img.alpha_composite(await draw_ring(data['current_home_coin'] / data['max_home_coin']), (98, 593)) + bg_img.alpha_composite( + await draw_ring(data['current_home_coin'] / data['max_home_coin'] if data['max_home_coin'] != 0 else 1), + (98, 593)) if data['current_home_coin'] == data['max_home_coin']: bg_draw.text((820, 701), f"洞天宝钱满了哦~", fill='white', font=get_font(40, '优设标题黑.ttf')) else: