# posbot-core

> chat-bot core with integration bus

Latest version **0.2.1** (published 2020-11-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install posbot-core
pnpm add posbot-core
yarn add posbot-core
bun add posbot-core
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

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

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2020-11-26 |
| First published | 2020-11-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 14.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Posline |
| Maintainers | feddot2517 |

## Links

- npm: https://www.npmjs.com/package/posbot-core
- Repository: https://github.com/feddot2517/posbot-core
- Homepage: https://github.com/feddot2517/posbot-core#readme
- Issues: https://github.com/feddot2517/posbot-core/issues
- npm.io page: https://npm.io/package/posbot-core

## Dependencies (2)

- [telegraf](https://npm.io/package/telegraf.md) ^3.38.0
- [node-vk-bot-api](https://npm.io/package/node-vk-bot-api.md) github:feddot2517/node-vk-bot-api#ac6b61f5ff19e4143c5fd8201f5aa8fa41861bf1

## Recent versions

- 0.2.1 (latest) — 2020-11-26
- 0.2.0 — 2020-11-26
- 0.1.1 — 2020-11-26
- 0.1.0 — 2020-11-26

## README

# posbot-core

## examples
### core startup example
```javascript
import { PosCore } from 'posbot-core';
import { TelegramBot } from 'posbot-core';
import { VkontakteBot } from 'posbot-core';

const core = new Core();
const telegramBot = new TelegramBot('token', 'tg-dev-bot');
const vkontakteBot = new VkontakteBot('token', 'vk-dev-bot');

core.addBot(telegramBot);
core.addBot(vkontakteBot);
core.init()

core.addMiddlewareEach((ctx, next) => {
    console.log(ctx.botAlias);
    console.log(ctx.user);

    ctx.reply('Hello, world!');
})
```

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