slack-remove-formatting

0.2.0 • Public • Published

Remove Slack message formatting npm version

Library version of this code.

Usage

const slack = require('@slack/client')
const makeRemoveFormatting = require('slack-remove-formatting')
 
const rtm = new slack.RtmClient(config.token)
 
rtm.on(slack.CLIENT_EVENTS.RTM.AUTHENTICATED, state => {
  const removeFormatting = makeRemoveFormatting(state)
 
  rtm.on(slack.RTM_EVENTS.MESSAGE, message => {
    const text = removeFormatting(message.text)
    console.log(text)
  })
})

Readme

Keywords

Package Sidebar

Install

npm i slack-remove-formatting

Weekly Downloads

0

Version

0.2.0

License

Unlicense

Unpacked Size

3.81 kB

Total Files

4

Last publish

Collaborators

  • valeriangalliat