feat: 添加了自动安装插件功能

This commit is contained in:
远野千束 2024-03-21 12:18:15 +08:00
parent e24c5c912e
commit a3d60fb435

View File

@ -86,7 +86,7 @@ async def _(result: Arparma, event: T_MessageEvent, bot: T_Bot):
elif result.subcommands.get("search"): elif result.subcommands.get("search"):
keywords: list[str] = result.subcommands["search"].args.get("keywords") keywords: list[str] = result.subcommands["search"].args.get("keywords")
rs = await npm_search(keywords) rs = await npm_search(keywords)
max_show = 20 max_show = 10
if len(rs): if len(rs):
reply = f"{ulang.get('npm.search_result')} | {ulang.get('npm.total', TOTAL=len(rs))}\n***" reply = f"{ulang.get('npm.search_result')} | {ulang.get('npm.total', TOTAL=len(rs))}\n***"
for plugin in rs[:min(max_show, len(rs))]: for plugin in rs[:min(max_show, len(rs))]: