mirror of
https://github.com/ClovertaTheTrilobita/SanYeCao-Nonebot.git
synced 2026-04-01 22:04:51 +00:00
fix(jm_download): 修正参数数量验证逻辑
This commit is contained in:
parent
350d22213c
commit
cabbd98dfe
1 changed files with 2 additions and 3 deletions
|
|
@ -9,9 +9,8 @@ jm = on_command("jm", rule=to_me(), priority=10,block=False)
|
|||
async def handle_function(message: MessageEvent):
|
||||
|
||||
values = message.get_plaintext().replace("/jm", "").split(" ")
|
||||
|
||||
if 3 > len(values) > 4:
|
||||
await jm.finish("请输入正确的格式 /jm+id 或 /jm+id+邮箱号")
|
||||
if len(values) != 3:
|
||||
await jm.finish("请输入正确的格式 /jm+id+邮箱号")
|
||||
else:
|
||||
if not validate_email(values[2]):
|
||||
await jm.finish("邮箱格式不正确!")
|
||||
|
|
|
|||
Loading…
Reference in a new issue