chatup-slack
v1.0.3
Published
A Chatup plugin that send a message to a slack channel when a user send a message with a specific string
Downloads
13
Readme
Chatup Slack Plugin
This plugin sends a message to a Slack Webhook URL when a message containing a specific string is sent on ChatUp.
You need to configure a new webhook on Slack before using this plugin.
Example
Start by installing chatup-slack
npm module with npm install --save chatup-slack
, then in your ChatUp worker file, do something like this:
var conf = {}; // Your configuration
var worker = new ChatUp.ChatWorker(conf);
worker.registerMiddleware(require('chatup-slack')({
slackUrl: 'YOUR SLACK URL',
triggers: [
'#911',
'#emergency',
'#support',
'#help'
], // These are your trigger words
slackPretext: 'A user on channel ${room.name} said:', // You can use whatever string is in the context of a ChatUp Middleware, look at the documentation on ChatUp repository
slackUsername: 'User: ${user.name}'
}));
worker.listen();