# cabal-bot-core

> Create bots for cabal!

Latest version **1.0.10** (published 2022-04-16) · AGPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install cabal-bot-core
pnpm add cabal-bot-core
yarn add cabal-bot-core
bun add cabal-bot-core
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.10 |
| Published | 2022-04-16 |
| First published | 2020-05-18 |
| Weekly downloads | 0 |
| License | AGPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 42.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | timgoeller |
| Maintainers | timgoeller |

## Links

- npm: https://www.npmjs.com/package/cabal-bot-core
- npm.io page: https://npm.io/package/cabal-bot-core

## Dependencies (1)

- [cabal-client](https://npm.io/package/cabal-client.md) ^7.0.0

## Recent versions

- 1.0.10 (latest) — 2022-04-16
- 1.0.9 — 2022-04-16
- 1.0.8 — 2021-08-17
- 1.0.7 — 2021-08-17
- 1.0.6 — 2021-01-08
- 1.0.5 — 2020-08-13
- 1.0.4 — 2020-08-13
- 1.0.3 — 2020-08-02
- 1.0.2 — 2020-06-16
- 1.0.1 — 2020-05-19
- 1.0.0 — 2020-05-18

## README

# Cabal Bot Core
Basic functionality for cabal bots (https://cabal.chat/). For more advanced command parsing see [`cabal-bot-pipeline`](https://github.com/timgoeller/cabal-bot-pipeline).

## Getting Started 
### Installing
`npm install cabal-bot-core`

### Examples

```javascript
var CabalBot = require('cabal-bot')

const cb = new CabalBot('test-bot')

cb.on('new-command', (envelope, cabal) => {
  console.log('command entered!')
})

cb.on('new-message', (envelope, cabal) => {
  cabal.publishMessage({
    type: 'chat/text',
    content: {
      text: envelope.message.value.content.text,
      channel: envelope.channel
    }
  })
})

cb.joinCabal('{key}')
```

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