Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

coffea-slack

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coffea-slack

_slack plugin for [coffea 1.0-beta](https://github.com/caffeinery/coffea/tree/1.0-beta)_

latest
npmnpm
Version
1.0.0-beta4
Version published
Maintainers
2
Created
Source

coffea-slack

slack plugin for coffea 1.0-beta

Setup

  • Make sure to use the latest beta version of coffea by running: npm install --save coffea@beta
  • Install coffea-slack: npm install coffea-slack

Usage

Specify the slack protocol in your network config:

{
  "protocol": "slack",
  "token": "xoxb-XXX", // required
  "prefix": "." // optional, default: !
}

coffea will automatically load coffea-slack when it's needed! Thus, using slack (or other protocols) this way should work on any coffea project, without any tweaks (other than installing coffea-slack and specifying the config).

coffea-slack aims to be compatible with coffea. Of course, features that slack doesn't have (like audio messages) aren't available for slack protocols, they will just be ignored.

API

You can use the Slack RTM API when sending events (make sure to use chat instead of channel for consistency with other protocols):

networks.send({
  type: 'message',
  chat: 'D0KT6J8S3',
  text: 'Hello world!'
})

But for simple events, like message, you should use the coffea helper instead:

import { message } from 'coffea'
networks.send(message('Hello world!', 'D0KT6J8S3'))

FAQs

Package last updated on 01 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts