rockets-slack

1.0.1 • Public • Published

Rockets Author Version Dependencies


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.

Readme

Keywords

Package Sidebar

Install

npm i rockets-slack

Weekly Downloads

3

Version

1.0.1

License

MIT

Last publish

Collaborators

  • rtheunissen