node-vk-bot-api
Advanced tools
Comparing version 0.1.9 to 0.2.0
{ | ||
"name": "node-vk-bot-api", | ||
"version": "0.1.9", | ||
"version": "0.2.0", | ||
"description": "Clean API for VK bots based on long poll with multi-dispatch send messages (~75 per second).", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -63,3 +63,3 @@ # VK Bot API | ||
```javascript | ||
app.setToken('88935996c67c290f47b79a0c8b0093227e916ce14c62e490aa96c8f8ed3090c9cbcdda92c8fadf1f5c74c'); | ||
app.auth('88935996c67c290f47b79a0c8b0093227e916ce14c62e490aa96c8f8ed3090c9cbcdda92c8fadf1f5c74c'); | ||
``` | ||
@@ -78,3 +78,3 @@ | ||
app.command('/start', (data) => { | ||
app.sendMessage({ user_id: data.user_id, message: 'This is start command!' }); | ||
app.sendMessage(data.user_id, 'This is start command!'); | ||
}); | ||
@@ -94,3 +94,3 @@ ``` | ||
app.hears('hello', (data) => { | ||
app.sendMessage({ user_id: data.user_id, message: 'Hi!' }); | ||
app.sendMessage(data.user_id, 'Hi!'); | ||
}); | ||
@@ -109,3 +109,3 @@ ``` | ||
app.reserve(data => { | ||
app.sendMessage({ user_id: data.user_id, message: 'Sorry, you sent not command to bot.' }); | ||
app.sendMessage(data.user_id, 'Sorry, you sent not command to bot.'); | ||
}); | ||
@@ -184,4 +184,8 @@ ``` | ||
### .getLongPoll() | ||
### .getLongPoll(longPollParams) | ||
| Parameter | Type | Requried | | ||
| ----------------|:---------:| ---------:| | ||
| longPollParams | object | yes | | ||
Start long poll. | ||
@@ -188,0 +192,0 @@ |
11965
191