Framework changes
This commit is contained in:
parent
1607b4be3f
commit
07ee08cb13
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1 +1,2 @@
|
||||||
node_modules
|
node_modules
|
||||||
|
.idea
|
20
index.js
20
index.js
|
@ -12,12 +12,14 @@ function roll(text) {
|
||||||
return "" + parser.parse(text);
|
return "" + parser.parse(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = function(ee) {
|
module.exports = function(configuration) {
|
||||||
ee.on('roll', function(slack) {
|
return function(ee) {
|
||||||
try {
|
ee.on('roll', function(slack) {
|
||||||
slack.replyUser(roll(slack.text));
|
try {
|
||||||
} catch (e) {
|
slack.replyUser(roll(slack.text));
|
||||||
slack.error(e.toString());
|
} catch (e) {
|
||||||
}
|
slack.error(e.toString());
|
||||||
});
|
}
|
||||||
};
|
});
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "slack-roll-command",
|
"name": "slack-roll-command",
|
||||||
"version": "0.0.0",
|
"version": "0.0.1",
|
||||||
"description": "A slack command to roll dice",
|
"description": "A slack command to roll dice",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
Loading…
Reference in a new issue