From 189846d11119b9f1788baaadb02a548d45130654 Mon Sep 17 00:00:00 2001 From: Maiko Tan Date: Wed, 24 Apr 2024 14:10:13 +0800 Subject: [PATCH] fix: some version of koishi failed to resolve scope of i18n text --- packages/core/src/command.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/core/src/command.tsx b/packages/core/src/command.tsx index 5ca2baec8..369e05a00 100644 --- a/packages/core/src/command.tsx +++ b/packages/core/src/command.tsx @@ -68,7 +68,7 @@ export function apply(ctx: Context, config: Config) { const filtered = images?.filter((image) => config.nsfw || !image.nsfw) - if (!filtered?.length) return session?.text('.no-result') + if (!filtered?.length) return session?.text('commands.booru.messages.no-result') const output: Element[][] = [] @@ -86,13 +86,13 @@ export function apply(ctx: Context, config: Config) { if (config.asset && ctx.assets) { url = await ctx.booru.imgUrlToAssetUrl(url) if (!url) { - children.unshift() + children.unshift() continue } } else if (config.base64) { url = await ctx.booru.imgUrlToBase64(url) if (!url) { - children.unshift() + children.unshift() continue } } @@ -101,10 +101,10 @@ export function apply(ctx: Context, config: Config) { if (image.tags) { children.unshift(

- {[source]} + {[source]}

,

- {[image.tags.join(', ')]} + {[image.tags.join(', ')]}

, ) } @@ -122,14 +122,14 @@ export function apply(ctx: Context, config: Config) {

{config.output >= OutputType.ImageAndLink && image.authorUrl ? ( - {[image.author]} + {[image.author]} ) : ( - {[image.author]} + {[image.author]} )}

,

- {[image.desc]} + {[image.desc]}

, ) } @@ -164,7 +164,7 @@ export function apply(ctx: Context, config: Config) { const tip = Random.pick(tips) output.push(

- + {[command.displayName]}

, )