autorm 防止 dme 进行 io 操作时自动切换到等待 sleep 线程结束

This commit is contained in:
xtaodada 2021-07-31 00:05:10 +08:00
parent 5966bfef73
commit 28fe2fe808
No known key found for this signature in database
GPG Key ID: EE4DC37B55E24736
2 changed files with 5 additions and 1 deletions

View File

@ -71,6 +71,8 @@ async def remove_message(context):
if text.startswith("-autorm"):
context.arguments = text.lstrip("-autorm").lstrip()
await autorm(context)
if text.startswith(f"-{alias_command('dme')}"):
return
await asyncio.sleep(delta)
await context.delete()
return
@ -79,6 +81,8 @@ async def remove_message(context):
if text.startswith("-autorm"):
context.arguments = text.lstrip("-autorm").lstrip()
await autorm(context)
if text.startswith(f"-{alias_command('dme')}"):
return
await asyncio.sleep(delta)
await context.delete()
return

View File

@ -32,7 +32,7 @@
},
{
"name": "autorm",
"version": "1.02",
"version": "1.03",
"section": "chat",
"maintainer": "fruitymelon",
"size": "6.7 kb",