From e4aa6300d86839ca1c062ddf1abe60caf2672298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=80=E5=8F=AA=E7=93=9C?= <52106595+a-fruity-melon@users.noreply.github.com> Date: Wed, 30 Sep 2020 20:27:08 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=20=E4=BF=AE=E5=A4=8D=20sendatparse?= =?UTF-8?q?=20(#60)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sendat.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sendat.py b/sendat.py index 017fc77..59aaa31 100644 --- a/sendat.py +++ b/sendat.py @@ -221,7 +221,7 @@ async def sendatdump(context): await context.edit(".\n-sendat " + "\n-sendat ".join(clean_mem)) @listener(outgoing=True, command="sendatparse", diagnostics=True, ignore_edited=True, - description="导入已导出的 sendat 配置") + description="导入已导出的 sendat 配置。用法:-sendatparse 在此处粘贴 -sendatdump 命令的输出结果") async def sendatparse(context): chat = await context.get_chat() text = "\n".join(context.message.text.split("\n")[1:]) @@ -233,6 +233,7 @@ async def sendatparse(context): for i in range(len(lines)): line = lines[i] sent = await sendmsg(context, chat, line) + await asyncio.sleep(1) sent.parameter = line.replace("-sendat ", "").split(" ") await sendat(sent)