@kznjunk/paperboy-slack
v1.0.2
Published
Send Slack messages a bit more quicker
Downloads
2
Readme
Paperboy Slack
How?
Simple message
const token = 'xxxx-00000000'
const { sendSlack } = require('@kznjunk/paperboy-slack')(token)
const channel = 'general'
const message = 'hello there!'
const res = await sendSlack(channel, message)
// res: { ok: true, ... }
Code
const token = 'xxxx-00000000'
const { sendSlack } = require('@kznjunk/paperboy-slack')(token)
const channel = 'general'
const message = 'afterwork beer for someone?'
const options = {
code: 'const x = 42'
}
const res = await sendSlack(channel, message, options)
// res: { ok: true, ... }
Note
The Slack token is available on the settings OAuth & Permissions page: https://api.slack.com/apps/{{appId}}/oauth?