slack-node
Version:
Slack API library for node
14 lines (11 loc) • 315 B
JavaScript
var Slack = require('../lib');
webhookUri = "-- api token --";
slack = new Slack();
slack.setWebhook(webhookUri);
slack.webhook({
channel: "#general",
username: "webhookbot",
text: "This is posted to #general and comes from a bot named webhookbot."
}, function(err, response) {
console.log(response);
});