From 07ee08cb136999f4b4ebd8585708d9cc8635d542 Mon Sep 17 00:00:00 2001 From: Kegan Myers Date: Sat, 9 Aug 2014 16:44:26 -0500 Subject: [PATCH] Framework changes --- .gitignore | 3 ++- index.js | 20 +++++++++++--------- package.json | 2 +- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index b512c09..34977ee 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -node_modules \ No newline at end of file +node_modules +.idea \ No newline at end of file diff --git a/index.js b/index.js index 9e19475..e893333 100644 --- a/index.js +++ b/index.js @@ -12,12 +12,14 @@ function roll(text) { return "" + parser.parse(text); } -module.exports = function(ee) { - ee.on('roll', function(slack) { - try { - slack.replyUser(roll(slack.text)); - } catch (e) { - slack.error(e.toString()); - } - }); -}; +module.exports = function(configuration) { + return function(ee) { + ee.on('roll', function(slack) { + try { + slack.replyUser(roll(slack.text)); + } catch (e) { + slack.error(e.toString()); + } + }); + }; +} \ No newline at end of file diff --git a/package.json b/package.json index afb9485..f31104b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "slack-roll-command", - "version": "0.0.0", + "version": "0.0.1", "description": "A slack command to roll dice", "main": "index.js", "dependencies": {