From 190e7ebdea084f17457ae2ce1596f9e716a8742f Mon Sep 17 00:00:00 2001 From: Snowykami <79104275+snowykami@users.noreply.github.com> Date: Sat, 13 Apr 2024 13:45:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20npm=20search=20=E7=BC=BA=E5=A4=B1=20`sho?= =?UTF-8?q?w=5Fnum`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- liteyuki/plugins/liteyuki_pacman/npm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liteyuki/plugins/liteyuki_pacman/npm.py b/liteyuki/plugins/liteyuki_pacman/npm.py index 32432576..404a2351 100644 --- a/liteyuki/plugins/liteyuki_pacman/npm.py +++ b/liteyuki/plugins/liteyuki_pacman/npm.py @@ -203,7 +203,7 @@ async def _(result: Arparma, event: T_MessageEvent, bot: T_Bot, npm: Matcher): elif sc.get("search"): keywords: list[str] = result.subcommands["search"].args.get("keywords") rs = await npm_search(keywords) - max_show = result.subcommands.get("search").args.get("show_num") + max_show = 10 if len(rs): reply = f"{ulang.get('npm.search_result')} | {ulang.get('npm.total', TOTAL=len(rs))}\n***" for storePlugin in rs[:min(max_show, len(rs))]: