From fc26fd5e26c5d4b954041f780af30c34b0133629 Mon Sep 17 00:00:00 2001 From: Jay Date: Tue, 7 Aug 2018 13:42:55 +0800 Subject: [PATCH] add roll command --- bin/dbVersion.json | 3 ++- libs/line-message/commands/actions/group.js | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/bin/dbVersion.json b/bin/dbVersion.json index 0ab91fd..1533586 100644 --- a/bin/dbVersion.json +++ b/bin/dbVersion.json @@ -11,7 +11,8 @@ {"file": "20180716-1.sql", "version": 9}, {"file": "20180718-1.sql", "version": 10}, {"file": "20180719-1.sql", "version": 11}, - {"file": "20180721-1.sql", "version": 12} + {"file": "20180721-1.sql", "version": 12}, + {"file": "20180807-1.sql", "version": 13} ], "test": [] } \ No newline at end of file diff --git a/libs/line-message/commands/actions/group.js b/libs/line-message/commands/actions/group.js index b5d1024..28d8bd1 100644 --- a/libs/line-message/commands/actions/group.js +++ b/libs/line-message/commands/actions/group.js @@ -475,6 +475,11 @@ const hello = async () => { return {reply: 'Hello World'} } +const roll = async () => { + let r = Math.floor(Math.random() * 10000) + return {reply: r} +} + module.exports = { addgroup: run.bind(null, addGroup), addpage: run.bind(null, addPage), @@ -483,5 +488,6 @@ module.exports = { deltwitch: run.bind(null, delTwitch), addyoutube: run.bind(null, addYoutube), hello: run.bind(null, hello), - image: run.bind(null, image) + image: run.bind(null, image), + roll: run.bind(null, roll) }