From 618996f67648e322eb594bb0a96cc7898058b8d7 Mon Sep 17 00:00:00 2001 From: chee Date: Thu, 1 Jun 2017 20:59:15 +0100 Subject: [PATCH] pull in changes from gcd branch --- index.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/index.js b/index.js index 9817024..a9fa6d7 100644 --- a/index.js +++ b/index.js @@ -5,14 +5,11 @@ const TYPE_MESSAGE = 'message' const MSG_CLEAR = /clear\s+orders/ const MSG_ORDER = /(?:no,?\s+)?order\s+me\s+(.*)/ -const MSG_LIST = /show\s+(?:all\s+)orders/ +const MSG_LIST = /show\s+(?:all\s+)?orders/ -const REPLY_CLEAR = '⚡! all gone' -const REPLY_ORDER = '📝 got it: ' - -const replyClear = () => '⚡ all gone' -const replyOrder = order => `📝 got it (${order})` -const replyList = orders => Object.entries(orders).map(([user, order], index) => `${index}. ${order} (by ${user})`).join('\n') +const replyClear = () => 'all gone ✨' +const replyOrder = order => `👍 got it (${order})` +const replyList = orders => Object.entries(orders).map(([user, order], index) => `${index + 1}. ${order} (by ${user})`).join('\n') let orders = {} @@ -23,7 +20,7 @@ const SlackBot = require('slackbots') const bot = new SlackBot({ token: process.env.token, - name: 'fneh' + name: 'lunchbot' }) bot.on(EVENT_MESSAGE, data => {