From eecfa7e8f2f8ddf5f1dfdab8728e2af006ae6ecb Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Thu, 19 Apr 2018 11:35:09 +0200 Subject: [PATCH] Improve variable assignment --- index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/index.js b/index.js index 157ae9d..1f41f72 100644 --- a/index.js +++ b/index.js @@ -73,9 +73,7 @@ module.exports = async function(robot) { }); robot.respond(/propose (\d*)\s?\S*\s?to (\S+)(?:\sfor (.*))?$/i, res => { - let amount = res.match[1]; - let githubUser = res.match[2]; - let description = res.match[3]; + let [_, amount, githubUser, description] = res.match; let url = null; createProposal(githubUser, amount, description, url).then((result) => { messageRoom('Sounds good! Will be listed on https://kredits.kosmos.org in a bit...');