From c7695b7459b680dc68d4e8c5d111dc5fa615547a Mon Sep 17 00:00:00 2001 From: SlyAimer <2289782085@qq.com> Date: Mon, 31 Mar 2025 18:08:57 +0800 Subject: [PATCH] =?UTF-8?q?fix(jm=5Fdownload):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=8F=90=E7=A4=BA=E5=92=8C=E7=A9=BA=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在下载前发送等待提示,并检查输入是否为空 --- src/plugins/jm_download.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/jm_download.py b/src/plugins/jm_download.py index 2ffa860..59013f8 100644 --- a/src/plugins/jm_download.py +++ b/src/plugins/jm_download.py @@ -8,8 +8,12 @@ from src.clover_image.delete_file import delete_file jm = on_command("jm", rule=to_me(), priority=10,block=False) @jm.handle() async def handle_function(message: MessageEvent): + await jm.send("正在下载中,请稍等") key = message.get_plaintext().replace("/jm", "").strip(" ") + if key == "": + await jm.finish("请输入jm的id") + output_file = await download_jm(key) await jm.send(MessageSegment.file_image(Path(output_file))) await delete_file(output_file)