rockets-slack
v1.0.1
Published
Slack integration client for rockets/rockets
Downloads
9
Readme
This is a Slack integration client for rockets/rockets.
Installation
npm install rockets-slack
Usage
var Client = require('rockets-slack');
// Integration configuration.
var config = {
// Slack webhook URL
webhook: "https://hooks.slack.com/services/*/*/*",
// Channel subscriptions
channels: {
// Configuration for post events (optional)
posts: {
// Highlight color in Slack for posts
color: "#ff4500",
// Filtering rules for posts
exclude: {},
include: {
contains: [
"abc",
]
},
},
// Configuration for comment events (optional)
comments: {
// Highlight color in Slack for comments
color: "#336699",
// Filtering rules for comments
exclude: {},
include: {
contains: [
"xyz",
]
},
},
}
};
// Create a new client using the configuration. You can create mutliple clients if you have more than one configuration.
var client = new Client(config);
// Establish a connection and start listening for events.
client.run();
Filters
See rockets/rockets for a complete list of filtering rules.
Warning: if no rules are specified, all models will be included.
Credits
Illustrations by Ken Samonte.