From 06374cb94f3ec7ab2f866334e5ecf7aaf98f972f Mon Sep 17 00:00:00 2001 From: krau <71133316+krau@users.noreply.github.com> Date: Sun, 8 Dec 2024 22:13:26 +0800 Subject: [PATCH] fix: avatar photo download --- kmua/callbacks/start.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kmua/callbacks/start.py b/kmua/callbacks/start.py index 74af76b..c3efc8b 100644 --- a/kmua/callbacks/start.py +++ b/kmua/callbacks/start.py @@ -51,7 +51,9 @@ async def start(update: Update, context: ContextTypes.DEFAULT_TYPE): context.bot.id, context ) dao.commit() - photo = db_bot_user.avatar_big_id or db_bot_user.avatar_big_blob + photo = db_bot_user.avatar_big_id + if not photo: + photo = common.get_big_avatar_bytes(context.bot.id, context) sent_message = await update.effective_message.reply_photo( photo=photo, caption="Nya~",