From e1fd0ad3b1768ce9bc91f5a9cdd2e67229f97836 Mon Sep 17 00:00:00 2001 From: loneshore <57182522+loneshore@users.noreply.github.com> Date: Mon, 12 Aug 2024 13:05:04 +0800 Subject: [PATCH] =?UTF-8?q?carbon=20=E4=BF=AE=E5=A4=8D=E8=87=AA=E5=B7=B1?= =?UTF-8?q?=E5=8F=91=E9=80=81=E4=BB=A3=E7=A0=81=E6=88=96=E9=9D=9E=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=96=87=E4=BB=B6=E6=97=B6=E7=9A=84=E6=84=8F=E5=A4=96?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- carbon/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/carbon/main.py b/carbon/main.py index 467e667..07b85d3 100644 --- a/carbon/main.py +++ b/carbon/main.py @@ -20,7 +20,7 @@ async def get_from_file(message: Message) -> str: reply = message.reply_to_message if message.document and message.document.mime_type.startswith("text"): msg = message - elif reply.document and reply.document.mime_type.startswith("text"): + elif reply and reply.document and reply.document.mime_type.startswith("text"): msg = reply if msg: path = await msg.download()