hemera-slackbot
v5.0.2
Published
Send Slack Messages over Hemera
Downloads
24
Readme
Hemera-slackbot
Simple wrapper around slack-bot-api allows you to send messages to slack users, groups and more with hemera.
Usage
const hemera = new Hemera(nats)
hemera.use(hemeraSlackbot, {
token: '<your-token>', // Add a bot https://my.slack.com/services/new/bot and put the token
name: 'myBot'
})
RTM (Real-time-messaging)
hemera.act({
topic: 'slackbot',
cmd: 'subscribe',
maxMessages$: -1,
(err, req) => {
// all ingoing events https://api.slack.com/rtm
})
API
See slack-bot-api for an overview of all available methods. We pass it one to one.
Why?
Slack is one of the most popular chat services and provide a great integration for many services. It's no secret that it can improve the flow of information in teams. Be notified of critical system or business errors anytime and anywhere. Emails are annoying!
- An important user has canceled his subscription -> notify me!
- We reached the first 10000 Users -> notify us!
- The server respond with 500 -> notify emergency group!
- ...
Credits
Idea by OsoianMarcel