# rs-vk-bot

> vk chat bot

Latest version **0.0.2** (published 2019-09-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install rs-vk-bot
pnpm add rs-vk-bot
yarn add rs-vk-bot
bun add rs-vk-bot
```

## 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.2 |
| Published | 2019-09-30 |
| First published | 2019-09-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 58.3 KB |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| Author | Sergey Radzishevskii |
| Maintainers | radzserg |
| Keywords | vk, chatbot |

## Links

- npm: https://www.npmjs.com/package/rs-vk-bot
- npm.io page: https://npm.io/package/rs-vk-bot

## Dependencies (3)

- [axios](https://npm.io/package/axios.md) ^0.19.0
- [debug](https://npm.io/package/debug.md) ^4.1.1
- [query-string](https://npm.io/package/query-string.md) ^6.8.3

## Recent versions

- 0.0.2 (latest) — 2019-09-30
- 0.0.1 — 2019-09-27

## README

# VK Chat Bot SDK

### Getting started

```

// get secret token for your bot
// https://vk.com/dev/bots_docs?f=1.1.%20Acquiring%20The%20Access%20Token

const vkClient = new ChatBotClient("vk-secret-token");
vkClient.on("message_new", async (vkMessage: VkMessage) => {
    console.log("Message", vkMessage);

    vkClient.reply(vkMessage.user_id, {
        message: "My reply"
    });
});
vkClient.start();

```

### VK keyboard

```
 const keyboard = new Keyboard([
        new ButtonsRow([
            new TextButton("Football", 'positive'),
            new TextButton("Basketball", 'negative'),
            new TextButton("Tennis", 'secondary')
        ]),
        new ButtonsRow([new LocationButton({some: "payload"})]),
    ]).oneTime();
    client.reply("1123441", {
        message: 'Select your sport',
        keyboard: keyboard
    });
```

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