1.0.2 • Published 2 years ago

@kznjunk/paperboy-slack v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Paperboy Slack

How?

Simple message

image

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

image

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?

1.0.2

2 years ago

1.0.1

3 years ago

1.0.0

3 years ago