mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-25 22:59:23 +00:00
commit
fd743daf4c
@ -42,10 +42,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sendat",
|
"name": "sendat",
|
||||||
"version": "1.0",
|
"version": "1.2",
|
||||||
"section": "chat",
|
"section": "chat",
|
||||||
"maintainer": "fruitymelon",
|
"maintainer": "fruitymelon",
|
||||||
"size": "13.0 kb",
|
"size": "13.1 kb",
|
||||||
"supported": true,
|
"supported": true,
|
||||||
"des-short": "定时发送消息。",
|
"des-short": "定时发送消息。",
|
||||||
"des": "这个人很懒,什么都没有留下。"
|
"des": "这个人很懒,什么都没有留下。"
|
||||||
|
@ -221,7 +221,7 @@ async def sendatdump(context):
|
|||||||
await context.edit(".\n-sendat " + "\n-sendat ".join(clean_mem))
|
await context.edit(".\n-sendat " + "\n-sendat ".join(clean_mem))
|
||||||
|
|
||||||
@listener(outgoing=True, command="sendatparse", diagnostics=True, ignore_edited=True,
|
@listener(outgoing=True, command="sendatparse", diagnostics=True, ignore_edited=True,
|
||||||
description="导入已导出的 sendat 配置")
|
description="导入已导出的 sendat 配置。用法:-sendatparse 在此处粘贴 -sendatdump 命令的输出结果")
|
||||||
async def sendatparse(context):
|
async def sendatparse(context):
|
||||||
chat = await context.get_chat()
|
chat = await context.get_chat()
|
||||||
text = "\n".join(context.message.text.split("\n")[1:])
|
text = "\n".join(context.message.text.split("\n")[1:])
|
||||||
@ -230,11 +230,13 @@ async def sendatparse(context):
|
|||||||
if text.find(".\n") == 0:
|
if text.find(".\n") == 0:
|
||||||
text = "\n".join(text.split("\n")[1:])
|
text = "\n".join(text.split("\n")[1:])
|
||||||
lines = text.split("\n")
|
lines = text.split("\n")
|
||||||
|
pms = []
|
||||||
for i in range(len(lines)):
|
for i in range(len(lines)):
|
||||||
line = lines[i]
|
line = lines[i]
|
||||||
sent = await sendmsg(context, chat, line)
|
sent = await sendmsg(context, chat, line)
|
||||||
sent.parameter = line.replace("-sendat ", "").split(" ")
|
sent.parameter = line.replace("-sendat ", "").split(" ")
|
||||||
await sendat(sent)
|
pms.append(sendat(sent))
|
||||||
|
await asyncio.wait(pms)
|
||||||
|
|
||||||
""" Modified pagermaid autorespond plugin. """
|
""" Modified pagermaid autorespond plugin. """
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user