slacksimple

Wrapper for Slack library.

Usage no npm install needed!

<script type="module">
  import slacksimple from 'https://cdn.skypack.dev/slacksimple';
</script>

README

Slacksimple

A wrapper for node-slack-sdk to make the common tasks easier.

Usage

Setup:

const Slacksimple = require('./slackwrapper');
const slack = new Slacksimple(botToken, appToken);
slack.connect();

Sending a message (with typing indicator):

slack.sendTyping(channel);
slack.postMessage(channel, text, opts);

Monitoring typed messages:

slack.connect({ onMessage: this.onMessage, bot: this });

Responding to presence events:

slack.connect({ onClientPresenceChange: this.onClientPresenceChange, bot: this });