Comparing version 0.2.0 to 0.2.1
{ | ||
"name": "ferd", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "A modular slackbot", | ||
"main": "index.js", | ||
"author": "Timothy Quach", | ||
"author": { | ||
"name": "Timothy Quach" | ||
}, | ||
"license": "ISC", | ||
@@ -11,3 +13,28 @@ "dependencies": { | ||
"slack-client": "^1.4.1" | ||
} | ||
}, | ||
"scripts": { | ||
"start": "node server.js" | ||
}, | ||
"gitHead": "fbb0e0b567a7c94db1e62b1ce6cf7ea91612846c", | ||
"_id": "ferd@0.2.0", | ||
"_shasum": "5f2b5060ef6e6114edb5b7a19c5bb93338bd7db4", | ||
"_from": "ferd@>=0.2.0 <0.3.0", | ||
"_npmVersion": "2.11.3", | ||
"_nodeVersion": "0.12.7", | ||
"_npmUser": { | ||
"name": "timothyquach", | ||
"email": "timothyquachbot@gmail.com" | ||
}, | ||
"dist": { | ||
"shasum": "5f2b5060ef6e6114edb5b7a19c5bb93338bd7db4", | ||
"tarball": "http://registry.npmjs.org/ferd/-/ferd-0.2.0.tgz" | ||
}, | ||
"maintainers": [ | ||
{ | ||
"name": "timothyquach", | ||
"email": "timothyquachbot@gmail.com" | ||
} | ||
], | ||
"directories": {}, | ||
"_resolved": "https://registry.npmjs.org/ferd/-/ferd-0.2.0.tgz" | ||
} |
@@ -11,3 +11,3 @@ var ResponseFactory = function(trigger, message, slack) { | ||
this.slack = slack; | ||
this.match = match | ||
this.match = match; | ||
}; | ||
@@ -26,2 +26,12 @@ | ||
/** | ||
* Posts message to same channel | ||
* @param {obj} response A message object | ||
*/ | ||
Response.prototype.postMessage = function(response) { | ||
var channelId = this.message.channel; | ||
var channel = this.getChannelGroupOrDMByID(channelId); | ||
channel.postMessage(response); | ||
}; | ||
/** | ||
* Returns Slack User object | ||
@@ -55,3 +65,3 @@ * https://api.slack.com/types/user | ||
return this.slack.getChannelGroupOrDMByID(id); | ||
} | ||
}; | ||
@@ -58,0 +68,0 @@ /** |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
6048
6
181
1