slack-helper
A Nodejs module facilitating Slack messaging.
installation
npm install --save slack-msg-helper
usage
Add client
const SL = // Will create a default configSL; // Will create a config with name "slack1"SL;
Use client
The client is chainable which means that you can call functions one after the other until you execute the posting. It then returning a promise.
Initialise a post:
// Creating message to group or channel called "my-channel"SL; // Creating message to group or channel called "my-channel" using the config "slack1"SL
Posting
For those example we will use the query variable 'slack':
// initialise queryvar slack = SL;
Simple message
slack;
Message with JSON attachement
slack;