From ceb522b21ff337a4446013cd745181f1c0c96602 Mon Sep 17 00:00:00 2001 From: Jay Date: Thu, 12 Jul 2018 11:56:16 +0800 Subject: [PATCH] update hello world command return struct --- libs/line-message/commands/actions/group.js | 2 +- libs/line-message/commands/index.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/line-message/commands/actions/group.js b/libs/line-message/commands/actions/group.js index 97a0308..f59fe2e 100644 --- a/libs/line-message/commands/actions/group.js +++ b/libs/line-message/commands/actions/group.js @@ -448,7 +448,7 @@ const addYoutube = async (txt = '', source = {}, db) => { } const hello = async () => { - return 'Hello World' + return {reply: 'Hello World'} } module.exports = { diff --git a/libs/line-message/commands/index.js b/libs/line-message/commands/index.js index 9f765a9..217b2f6 100644 --- a/libs/line-message/commands/index.js +++ b/libs/line-message/commands/index.js @@ -9,6 +9,7 @@ const parseCMD = async (text = '', source = {}) => { if (arr.length === 0) return null if (arr[0][0] !== '!') return null let cmd = arr[0].replace(/^!/, '') + cmd = cmd.toLowerCase() let db = await DB.connect() let reply = null