Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 944 Bytes

README.md

File metadata and controls

40 lines (27 loc) · 944 Bytes

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?