chatup-slack

1.0.3 • Public • Published

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();

Readme

Keywords

none

Package Sidebar

Install

npm i chatup-slack

Weekly Downloads

1

Version

1.0.3

License

ISC

Last publish

Collaborators

  • geekuillaume