# botstation

> Tiny framework to build your own chatbot

Latest version **0.0.1** (published 2017-03-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install botstation
pnpm add botstation
yarn add botstation
bun add botstation
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2017-03-19 |
| First published | 2017-03-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | Alessio Biancalana |
| Maintainers | dottorblaster |
| Keywords | bot, slack, facebook, messenger, chatops, chatbot, automation |

## Links

- npm: https://www.npmjs.com/package/botstation
- Repository: https://github.com/uniquid/botstation
- Homepage: https://github.com/uniquid/botstation#readme
- Issues: https://github.com/uniquid/botstation/issues
- npm.io page: https://npm.io/package/botstation

## Dependencies (1)

- [slackbots](https://npm.io/package/slackbots.md) ^1.0.2

## Recent versions

- 0.0.1 (latest) — 2017-03-19

## README

# Botstation
Botstation is a tiny framework made to build your own chatbot fast.

## Installation
```
npm install --save botstation
```

## Usage
```js
var Botstation = require('botstation');
var bot = new Botstation.Bot();

bot.config({
    key: 'xoxb-157105193143-eJdSjJRttSCU2DAd3IdAtBoi',
    name: 'Dat Bot'
});

bot.task({
    name: "Help",
    matcher: "isMessage",
    content: "!help",
    exec: (bot, data, params) => {
        bot.postMessage(data.channel, 'Do you need help?', params);
    }
});

bot.start(() => {
    console.log('Bot started!');
});
```

## Matchers
You can configure tasks to match in several ways with incoming messages:

- `isMessage`: Checks if the incoming message is strictly equal to the specified content
- `beginWith`: Checks if an incoming message begins with the specified content string
- `isJoining`: Looks for channel joining events in incoming messages, so the bot can advertise itself

---
_Source: https://npm.io/package/botstation · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
