slackbase

1.1.1 • Public • Published

Build status Dependencies

Usage by example

npm install --save slackbase
const Bot = require('slackbase')
  , bot = new Bot('SLACK-TOKEN-HERE')
  ;
 
bot.listen(/good night/).permit(message => {
  // only reply if after 17:00 and message is a DM
  const now = new Date();
  return message.isDM() && now.getHours() >= 17;
}).action(message => {
  const user = message.getUser();
  const channel = message.getChannel();
  channel.send(`sleep tight, ${user.name}`);
});

Running tests

git clone https://github.com/makerbot/slackbot.git
cd slackbot
npm install
npm test

Can also see status on https://travis-ci.org/makerbot/slackbot

FAQ

Why is the NPM package titled slackbase but the repo slackbot?

Well, every variation of slackbot is already claimed on NPM, but slackbot makes the most sense for what this project is.

Package Sidebar

Install

npm i slackbase

Weekly Downloads

0

Version

1.1.1

License

ISC

Last publish

Collaborators

  • ytahunova
  • jellespijker
  • dudecc
  • philip.snyder
  • nallath
  • ambarova
  • s.shevchenko
  • craig-ultimaker
  • pavel_starusiev
  • umrano
  • ultimich
  • schiavini-ultimaker
  • ultisedwards
  • ivanshaparenko
  • ulti_merel
  • bradam-mb
  • vyevdokymov
  • alexander.david
  • vleha
  • mbdevops
  • leorfree
  • compuder
  • shirleydu
  • koleynik
  • tingtingchen
  • gsw