From 3d73029c3dc28b6fe9a80222e56e92d3877f3cb0 Mon Sep 17 00:00:00 2001 From: Shigma <1700011071@pku.edu.cn> Date: Sat, 14 Mar 2020 00:15:50 +0800 Subject: [PATCH] fix(plugin-common): optimize contextify message --- packages/plugin-common/src/contextify.ts | 2 +- packages/plugin-common/tests/contextify.spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/plugin-common/src/contextify.ts b/packages/plugin-common/src/contextify.ts index 6bf8c7583b..c9e50f0b2f 100644 --- a/packages/plugin-common/src/contextify.ts +++ b/packages/plugin-common/src/contextify.ts @@ -14,7 +14,7 @@ export default function apply (ctx: Context) { '讨论组聊天没有子类型。', ].join('\n')) .action(async ({ meta, options }, message) => { - if (!message) return meta.$send('请输入要发送的文本。') + if (!message) return meta.$send('请输入要触发的指令。') if (options.member) { if (meta.messageType === 'private') { diff --git a/packages/plugin-common/tests/contextify.spec.ts b/packages/plugin-common/tests/contextify.spec.ts index cc04392b2a..a301204b5c 100644 --- a/packages/plugin-common/tests/contextify.spec.ts +++ b/packages/plugin-common/tests/contextify.spec.ts @@ -21,7 +21,7 @@ beforeAll(async () => { }) test('check input', async () => { - await session1.shouldHaveReply('ctxf -u 456', '请输入要发送的文本。') + await session1.shouldHaveReply('ctxf -u 456', '请输入要触发的指令。') await session2.shouldHaveReply('ctxf -m foo show-context', '未指定目标。') await session1.shouldHaveReply('ctxf show-context', '请提供新的上下文。') await session1.shouldHaveReply('ctxf -u 789 show-context', '权限不足。')