Skip to content

Commit

Permalink
fix(plugin-common): optimize contextify message
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Mar 13, 2020
1 parent 28b9e4f commit 3d73029
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/plugin-common/src/contextify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-common/tests/contextify.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', '权限不足。')
Expand Down

0 comments on commit 3d73029

Please sign in to comment.