From 37aec5948c72a87adf9e9fa024f568d4bc5dbe7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=BA=E6=99=BA=E7=9A=84=E5=B0=8F=E9=B1=BC=E5=90=9B?= <44761872+Dragon-Fish@users.noreply.github.com> Date: Mon, 22 Mar 2021 12:28:09 +0800 Subject: [PATCH] fix(image-search): fix subcommand hell (#170) --- packages/plugin-image-search/src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/plugin-image-search/src/index.ts b/packages/plugin-image-search/src/index.ts index a36e6efb7e..2453c48fa0 100644 --- a/packages/plugin-image-search/src/index.ts +++ b/packages/plugin-image-search/src/index.ts @@ -36,11 +36,11 @@ export function apply(ctx: Context, config: Config = {}) { ctx.command('search [image]', '搜图片') .shortcut('搜图', { fuzzy: true }) .action(search(mixedSearch)) - .subcommand('saucenao [image]', '使用 saucenao 搜图') + ctx.command('search/saucenao [image]', '使用 saucenao 搜图') .action(search(saucenao)) - .subcommand('ascii2d [image]', '使用 ascii2d 搜图') + ctx.command('search/ascii2d [image]', '使用 ascii2d 搜图') .action(search(ascii2d)) - .subcommand('iqdb [image]', '使用 iqdb 搜图') + ctx.command('search/iqdb [image]', '使用 iqdb 搜图') .action(search(iqdb)) const pendings = new Set()