@kznjunk/paperboy-slack

1.0.2 • Public • Published

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?

Dependents (0)

Package Sidebar

Install

npm i @kznjunk/paperboy-slack

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

2.66 kB

Total Files

3

Last publish

Collaborators

  • kibwashere